Semiconductor memory device which stores plural data in a cell

ABSTRACT

A memory cell array is configured to have a plurality of memory cells arranged in a matrix, each of the memory cells being connected to a word line and a bit line and being capable of storing n values (n is a natural number equal to or larger than 3). A control circuit controls the potentials of the word line and bit line according to input data and writes data into a memory cell. The control circuit writes data into the memory cell to a k-valued threshold voltage (k&lt;=n) in a write operation, precharges the bit line once, and then changes the potential of the word line an i number of times to verify whether the memory cell has reached an i-valued (i&lt;=k) threshold voltage.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of and claims the benefit of priorityunder 35 U.S.C. § 120 from U.S. application Ser. No. 15/453,302, filedMar. 8, 2017, which is a continuation of U.S. application Ser. No.15/175,806, filed Jun. 7, 2016 which is a continuation of U.S.application Ser. No. 14/825,858, filed Aug. 13, 2015, now U.S. Pat. No.9,390,802, which is a continuation of U.S. application Ser. No.14/017,611, filed Sep. 4, 2013, now U.S. Pat. No. 9,142,299, which is acontinuation of U.S. application Ser. No. 13/754,057, filed Jan. 30,2013, now U.S. Pat. No. 8,542,538, which is a continuation of U.S.application Ser. No. 13/413,779, filed Mar. 7, 2012, now U.S. Pat. No.8,385,130, which is a division of U.S. application Ser. No. 12/775,571,filed May 7, 2010, now U.S. Pat. No. 8,154,930, which is a continuationof U.S. application Ser. No. 12/117,767, filed May 9, 2008, now U.S.Pat. No. 7,738,302, which is a division of U.S. application Ser. No.11/759,627, filed Jun. 7, 2007, now U.S. Pat. No. 7,376,009, which is adivision of U.S. application Ser. No. 10/988,592, filed Nov. 16, 2004,now U.S. Pat. No. 7,245,528 and claims the benefit of priority under 35U.S.C. § 119 from Japanese Patent Applications No. 2004-024475, filedJan. 30, 2004, and No. 2004-160165, filed May 28, 2004, the entirecontents of all of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

This invention relates to a semiconductor memory device capable ofstoring, for example, 2 bits or more of data.

2. Description of the Related Art

A nonvolatile semiconductor memory device capable of storing multivalueddata, such as a NAND flash memory using EEPROM, has been proposed (forexample, refer to Jpn. Pat. Appln. KOKAI Publication No. 2000-195280).

In a nonvolatile semiconductor memory device of this type, whenmultivalued data is stored in a memory cell, a threshold voltagecorresponding to each data is set in the memory cell. The number ofthreshold voltages increases as the number of bits in data stored in thememory cell increases. For example, to store 2 bits of 4-valued data,four threshold voltages are required. To store 3 bits of 8-valued data,eight threshold voltages are needed.

When data is written into a memory cell, it is verified whether thethreshold voltage of the memory cell has reached a threshold voltagecorresponding to the data to be written. To carry out a verifyoperation, the bit line to which the memory cell is connected isprecharged to a specific potential. In this state, a verify voltage issupplied to the word line. If the threshold voltage of the memory cellhas not reached the threshold voltage corresponding to the writing data,the memory cell turns on. As a result, the potential on the bit line isdischarged via the memory cell and therefore goes low. In contrast, ifthe threshold voltage of the memory cell has reached the thresholdvoltage corresponding to the writing data, the memory cell remains off.As a result, the bit line remains high. The potential on the bit line isdetected, thereby verifying the threshold voltage of the memory cell.The result of the verification has shown that the threshold voltage ofthe memory cell has not reached the threshold voltage corresponding tothe data to be written into, writing is done again.

As described above, in a nonvolatile semiconductor memory device whichstores multivalued data, when the number of bits of data to be stored islarge, the number of threshold voltages set in the memory cellincreases. In writing data, the verify operation has to be carried foron each threshold voltage. Consequently, it requires a long time tocarry out the verify operation, which makes it difficult to speed up thedata write operation.

BRIEF SUMMARY OF THE INVENTION

According to a first aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell array which isconfigured to have a plurality of memory cells arranged in a matrix,each of the plurality of memory cells being connected to a word line anda bit line and being capable of storing n values (n is a natural numberequal to or larger than 3); and a control circuit which controls thepotential of the word line and bit line according to input data andwrites data into a memory cell and which writes data into the memorycell to a k-valued threshold voltage (k<=n) in a write operation,precharges the bit line once, and then changes the potential of the wordline an i number of times to verify whether the memory cell has reachedan i-valued (i<k) threshold voltage.

According to a second aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell array which isconfigured to have a plurality of memory cells arranged in a matrix,each of the plurality of memory cells being connected to a word line anda bit line and being capable of storing 4 values; and a control circuitwhich controls the potentials of the word line and bit line according toinput data and writes data into the memory cell and, wherein the controlcircuit, in a first write operation, changes the threshold voltage ofthe memory cell from a first threshold voltage to either the firstthreshold voltage or a second threshold voltage (the first thresholdvoltage <the second threshold voltage) and in a second write operation,changes the threshold voltage of the memory cell to either the firstthreshold voltage or a third threshold voltage (the first thresholdvoltage <the third threshold voltage) if the threshold voltage of thememory cell is the first threshold voltage, and to either a fourththreshold voltage (the second threshold voltage <=the fourth thresholdvoltage) or a fifth threshold voltage (the fourth threshold voltage <thefifth threshold voltage) if the threshold voltage of the memory cell isthe second threshold voltage and which, in the first and second writeoperations, raises a program voltage in increments of ΔVpgm and carriesout a write operation by repeating a program and verify operation, ΔVpgmin the first write operation being larger than ΔVpgm in the second writeoperation.

According to a third aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell array which isconfigured to have a plurality of memory cells arranged in a matrix,each of the plurality of memory cells being connected to a word line anda bit line and being capable of storing 4 values; and a control circuitwhich controls the potentials of the word line and bit line according toinput data and writes data into the memory cell, wherein the controlcircuit, in a first write operation, changes the threshold voltage ofthe memory cell from a first threshold voltage to either the firstthreshold voltage or a second threshold voltage (the first thresholdvoltage <the second threshold voltage) and in a second write operation,changes the threshold voltage of the memory cell to either the firstthreshold voltage or a third threshold voltage (the first thresholdvoltage <the third threshold voltage) if the threshold voltage of thememory cell is the first threshold voltage, and to either a fourththreshold voltage (the second threshold voltage <=the fourth thresholdvoltage) or a fifth threshold voltage (the fourth threshold voltage <thefifth threshold voltage) if the threshold voltage of the memory cell isthe second threshold voltage and which, in the second write operation,sets a maximum value to the number of verify operations of verifyingwhether the third threshold voltage has been reached by repeating aprogram and verify operation and, when the number of verify operationshas reached the maximum value, skips the verify operation of verifyingwhether the third threshold voltage has been reached.

According to a fourth aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell which storesdata using a first threshold voltage to an n-th threshold voltage (n isa natural number equal to or larger than 2); and a control circuit whichwrites any one of the first to n-th threshold voltages according toinput data, wherein the control circuit, in a first write operation,writes k-valued threshold voltages of the n-th threshold voltage,(n−1)-th threshold voltage, . . . , (n−k+1)-th threshold voltage intothe memory cell and, in a second write operation, writes k-valuedthreshold voltages of the (n−k)-th threshold voltage, (n−k−1)-ththreshold voltage, . . . , (n−2k+1)-th threshold voltage into the memorycell and, in an n/k-th write operation, writes (k−1)-valued thresholdvoltages of the k-th threshold voltage, the (k−1)-th threshold voltage,. . . , second threshold voltage into the memory cell.

According to a fifth aspect of the present intention, there is provideda semiconductor memory device comprising: a memory which stores at leastone data item; at least one data storage circuit which is connected tothe memory cell and stores externally inputted data of a first logiclevel or a second logic level; and a control circuit which controls theoperation of the data storage circuit, wherein the control circuit, whenthe logic level of the data stored in the data storage circuit is thefirst logic level, inverts the logic level to the second logic leveland, when the logic of the data is the second logic level, inverts thelogic level to the first logic level and further, when the logic levelof the data stored in the data storage circuit is the first logic level,does writing on the memory cell to raise the threshold voltage and, whenthe logic level of the data is the second level, causes the thresholdvoltage of the memory cell to remain unchanged.

According to a sixth aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell array configuredto have a plurality of memory cells arranged in a matrix, each of theplurality of memory cells being connected to a word line and a bit lineand being capable of storing n values (n is a natural number equal to orlarger than 3); and a control circuit which controls the potentials ofthe word line and bit line according to input data and writes data intoa memory cell, wherein the control circuit writes data into the memorycell to an a1-valued (a1<=n) threshold voltage in a first writeoperation, to an a2-valued (a2<=n) threshold voltage in a second writeoperation, to an ak-valued (ak<=n) threshold voltage in a k-th writeoperation (k is a natural number equal to or larger than 2: k<=n) andwhich, in the first to k-th write operations, raises a program voltagein increments of ΔVpgm and carries out write operations by repeating aprogram and verify operation, ΔVpgm in the first to k-th writeoperations fulfilling the following expression: the first ΔVpgm >thesecond ΔVpgm > . . . >the k-th ΔVpgm.

According to a seventh aspect of the present intention, there isprovided a semiconductor memory device comprising: a memory cell whichstores data using a first to an n-th threshold voltage, each of thethreshold voltages being defined so as to increase in the order of thefirst threshold voltage to the n-th threshold voltage (n is a naturalnumber equal to or larger than 2) and rising as a result of a writeoperation; a control circuit which writes any one of the first to n-ththreshold voltages into the memory cell according to input data, whereinthe control circuit, in a first write operation, writes k1-valuedthreshold voltages of the n-th threshold voltage, (n−1)-th thresholdvoltage, . . . , (n−k1+1)-th threshold voltage into the memory cell and,in a second write operation, writes k2-valued threshold voltages of(n−k1)-th threshold voltage, (n−k1−1)-th threshold voltage, . . . ,(n−k1−k2+1)-th threshold voltage into the memory cell and, in an i-thwrite operation, writes (ki−1)-valued threshold voltages of the ki-ththreshold voltage, (ki−1)-th threshold voltage, . . . , second thresholdvoltage into the memory cell.

According to an eighth aspect of the present intention, there isprovided a semiconductor memory device comprising: a memory cell arrayconfigured to have a plurality of memory cells arranged in a matrix,each of the plurality of memory cells being connected to a word line anda bit line and being capable of storing n values (n is a natural numberequal to or larger than 3); a control circuit which controls thepotentials of the word line and bit line according to input data andwrites data into a memory cell and which, in a write operation, carriesout a verify operation using a threshold voltage lower than a k-valuedthreshold voltage in verifying whether the threshold voltage of thememory cell has reached the k-valued threshold voltage and, if thethreshold voltage of the memory cell has exceeded the threshold voltagelower than the k-valued threshold voltage, sets the data in the datastorage circuit to the same data to be written to an i-valued thresholdvoltage (i<k) lower than the k-valued threshold voltage; and a datastorage circuit which is connected to the bit line and stores at leastone bit of data.

According to a ninth aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell which stores kbits of data (k is a natural number equal to or larger than 2); a firststorage circuit which stores externally inputted data and the data readfrom the memory cell; a second storage circuit which stores the datastored in the first storage circuit; a third storage circuit whichstores the data read from the memory cell; a fourth storage circuitwhich stores the data stored in the third storage circuit; and a controlcircuit which holds or change the data in the first to fourth storagecircuits according to the data stored in the memory cell in a writeoperation and which writes 8-valued data simultaneously in a third pagewrite operation.

According to a tenth aspect of the present intention, there is provideda semiconductor memory device comprising: a memory cell array in which aplurality of memory cells are arranged in a matrix, each of theplurality of memory cells being connected to a word line and a bit lineand being capable of storing n values (n is a natural number equal to orlarger than 3); and a control circuit which controls the potentials ofthe word line and bit line according to input data and reads data fromthe memory cell and which reads the data from the memory cell byprecharging the bit line once and then changing the potential of theword line an i number of times.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

FIGS. 1A, 1B, 1C, and 1D show the relationship between data in a memorycell and the threshold voltages of the memory cell;

FIG. 2 shows a schematic configuration of a nonvolatile semiconductormemory device;

FIG. 3 is a circuit diagram showing the configuration of the memory cellarray and bit-line control circuit of FIG. 2 according to a firstembodiment of the present invention;

FIGS. 4A and 4B are a sectional view of a memory cell and that of aselect transistor;

FIG. 5 is a sectional view of a NAND cell in the memory cell array;

FIG. 6 is a circuit diagram of an example of the data storage circuitshown in FIG. 3;

FIG. 7 shows the procedure for writing data into a NAND cell;

FIG. 8 is a flowchart to explain a first page program operation;

FIG. 9 is a flowchart to explain a second page program operation;

FIGS. 10A and 10B show the relationship between each data cache and datain a memory cell;

FIGS. 11A, 11B, and 11C show the procedure for setting a data cache;

FIGS. 12A, 12B, and 12C show the procedure for setting a data cache;

FIGS. 13A and 13B show a data cache in a verify operation;

FIG. 14 shows a data cache in a verify operation;

FIG. 15 shows a data cache in a verify operation;

FIG. 16 shows a data cache in a verify operation;

FIG. 17 is a flowchart to explain a second page program operation,showing a modification of the first embodiment;

FIGS. 18A and 18B are flowcharts to explain a read operation:

FIG. 19 is a circuit diagram of a modification of FIG. 3, showing asecond embodiment of the present invention;

FIGS. 20A, 20B and 20C show the relationship between data in a memorycell and the threshold voltages of the memory cell;

FIGS. 21A and 21B show the relationship between data in a memory celland the threshold voltages of the memory cell;

FIGS. 22A and 22B show an example of the order in which writing is donein the second embodiment;

FIG. 23 is a flowchart to explain a third page program in the secondembodiment;

FIG. 24 is a flowchart to explain the third page program following FIG.23;

FIGS. 25A and 25B show the state of a data cache in the third pageprogram;

FIG. 26 shows the state of the data cache in the third page program;

FIGS. 27A and 27B are flowcharts to explain a first page read operationand a second page read operation, respectively;

FIG. 28 is a flowchart to explain a third page read operation;

FIG. 29 is a flowchart to explain a third page write operation accordingto a third embodiment of the present invention;

FIG. 30 is a flowchart to explain the third page write operationfollowing FIG. 29;

FIGS. 31A and 31B are flowcharts to explain a first page read operationand a second page read operation, respectively;

FIG. 32 shows an example of arranging a plurality of flag cells;

FIGS. 33A to 33F show the relationship between data in a memory cell andthe threshold voltages of the memory cell according to a fourthembodiment of the present invention;

FIG. 34 is a flowchart to explain a first page operation in the fourthembodiment;

FIG. 35 is a flowchart to explain a second page operation in the fourthembodiment;

FIGS. 36A and 36B show the relationship between each data cache and datain the memory cell in the fourth embodiment;

FIGS. 37A and 37B show the relationship between each data cache and datain the memory cell in the fourth embodiment;

FIG. 38 shows the relationship between each data cache and data in thememory cell in the fourth embodiment;

FIGS. 39A, 39B and 39C show the relationship between each data cache anddata in the memory cell according to a fifth embodiment of the presentinvention;

FIG. 40 shows the relationship between each data cache and data in thememory cell in the fifth embodiment;

FIGS. 41A and 41B show the relationship between each data cache and datain the memory cell in the fifth embodiment;

FIGS. 42A and 42B show the relationship between each data cache and datain the memory cell in the fifth embodiment;

FIGS. 43A, 43B and 43C show the relationship between data in a memorycell and the threshold voltages of the memory cell according to a sixthembodiment of the present invention;

FIGS. 44A, and 44B show the relationship between data in a memory celland the threshold voltages of the memory cell in the sixth embodiment;

FIG. 45 is a flowchart to explain a third page write operation in thesixth embodiment;

FIG. 46 is a flowchart to explain a third page write operation in thesixth embodiment;

FIGS. 47A and 47B show the relationship between each data cache and datain the memory cell in the sixth embodiment;

FIGS. 48A and 48B show the relationship between each data cache and datain the memory cell in the sixth embodiment;

FIGS. 49A and 49B show the relationship between each data cache and datain the memory cell in the sixth embodiment;

FIGS. 50A and 50B show the relationship between each data cache and datain the memory cell in the sixth embodiment;

FIGS. 51A and 51B show the relationship between each data cache and datain the memory cell in the sixth embodiment;

FIG. 52 shows the relationship between each data cache and data in thememory cell in the sixth embodiment;

FIG. 53 is a circuit diagram showing the configuration of a data storagecircuit according to a seventh embodiment of the present invention;

FIG. 54 is a flowchart to explain a third page write operation in theseventh embodiment;

FIG. 55 is a flowchart to explain a third page write operation in theseventh embodiment;

FIGS. 56A and 56B show the relationship between each data cache and datain the memory cell in the seventh embodiment;

FIG. 57 is a plan view showing an example of a nonvolatile semiconductormemory device applied to the first to seventh embodiments;

FIG. 58 is a sectional view taken along line 58-58 of FIG. 57;

FIG. 59 is a sectional view taken along line 59-59 of FIG. 57;

FIG. 60 is a block diagram of a memory card to which a semiconductormemory device of the present invention is applied;

FIG. 61 is a block diagram showing an internal configuration of thememory card to which the semiconductor memory device of the presentinvention is applied;

FIG. 62 is a perspective view of the memory card to which thesemiconductor memory device of the invention is applied and a cardholder;

FIG. 63 is a perspective view of a connection unit to which the memorycard and card holder are connected:

FIG. 64 is a perspective view showing a case where a connection unit inwhich the card memory is inserted is connected to a personal computerwith a connection wire;

FIG. 65 is a plan view of an IC card to which a semiconductor memorydevice of the present invention is applied;

FIG. 66 is a block diagram showing an internal configuration of the ICcard shown in FIG. 65; and

FIG. 67 is a block diagram of a USB memory device to which a nonvolatilesemiconductor memory device of each of the embodiments is applied.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, referring to the accompanying drawings, embodiments of thepresent invention will be explained.

First Embodiment

FIG. 2 schematically shows the configuration of a nonvolatilesemiconductor memory device according to a first embodiment of thepresent invention. For example, the configuration of a NAND flash memorywhich stores 4-valued (2 bits of) data is shown in FIG. 2.

A memory cell array 1 includes a plurality of bit lines, a plurality ofword lines, and a common source line. In the memory array 1, forexample, memory cells are arranged in a matrix. Each of the memory cellsis composed of an EEPROM cell and enables data to be rewrittenelectrically. A bit line control circuit 2 for controlling the bit linesand a word line control circuit 6 are connected to the memory cell array1.

The bit line control circuit 2 includes a plurality of data storagecircuits and a flag data storage circuit as described later. The bitline control circuit 2 reads the data in a memory cell in the memorycell array 1 via a bit line, detects the state of a memory cell in thememory cell array 1 via a bit line, or writes data into a memory cell inthe memory cell array 1 by applying a write control voltage to thememory cell via a bit line. A column decoder 3 and a data input/outputbuffer 4 are connected to the bit line control circuit 2. The columndecoder 3 selects one of the data storage circuits in the bit linecontrol circuit 2. The data in a memory cell read into a data storagecircuit is outputted via the data input/output buffer 4 from a datainput/output terminal 5 to the outside world.

Writing data externally inputted to the data input/output terminal 5 isinputted via the data input/output buffer 4 to the data storage circuitselected by the column decoder 3.

The word line control circuit 6 is connected to the memory cell array 1.The word line control circuit 6 selects a word line in the memory cellarray 1 and applies a voltage necessary for reading, writing, or erasingto the selected word line.

The memory cell array 1, bit line control circuit 2, column decoder 3,data input/output buffer 4, and word line control circuit 6, which areconnected to a control signal and control voltage generating circuit 7,are controlled by the control signal and control voltage generatingcircuit 7. The control signal and control voltage generating circuit 7,which is connected to a control signal input terminal 8, is controlledby a control signal externally inputted via the control signal inputterminal 8.

The bit line control circuit 2, column decoder 3, word line controlcircuit 6, and control signal and control voltage generating circuit 7constitute a write circuit and a read circuit.

FIG. 3 shows the configuration of the memory cell array 1 and bit linecontrol circuit 2 of FIG. 2. In the memory cell array 1, a plurality ofNAND cells are provided. A NAND cell is composed of memory cells MCs(made up of, e.g., 16 EEPROMs) connected in series and a first and asecond select gate S1, S2. The first select gate S1 is connected to bitline BL0 and the second select gate S2 is connected to source line SRC.The control gates of the memory cells arranged in each row are connectedequally to word lines WL1, WL2, WL3, . . . , WL16. The first selectgates S1 are connected equally to select line SG1 and the second selectgates S2 are connected to select line SG2.

The bit line control circuit 2 has a plurality of data storage circuits10 and a first and a second flag data storage circuit 10 a, 10 b. Pairsof bit lines (BL0, BL1), (BL2, BL3), . . . , (BLi, BLi+1), (BLf1, BLf2),(BLf3, BLf4) are connected to the data storage circuits 10 and the firstand second flag data storage circuits 10 a, 10 b in a one-to-onecorrespondence.

The memory cell array 1 includes a plurality of blocks as shown by thebroken lines. Each block is composed of a plurality of NAND cells. Thedata is erased in blocks. An erase operation is performed simultaneouslyon the two bit lines connected data storage circuit 10 and the first andsecond flag data storage circuits 10 a and 10 b.

A plurality of memory cells (the memory cells enclosed by the brokenline) provided every other bit line and connected to a single word lineconstitute a sector. Data is written or read in sectors. In a sector,for example, two pages of data are stored. A plurality of first flagcells FC1 for storing flags and a plurality of second flag cells FC2 areconnected to each word line. That is, in the first embodiment, a sectorincludes a first flag cell FC1 and a second flag cell FC2.

Each of the first and second flag cells FC1, FC2 is not limited to onefor each sector. For instance, a plurality of flag cells may beconnected to one sector as shown by the broken lines. In this case, thedata stored in the flag cells may be decided by the majority of the datastored in the plurality of flag cells as described later.

In a read operation, a program verify operation, and a programoperation, one bit line is selected from the two bit lines (BLi, BLi+1)connected to the data storage circuit 10 according to an externallyspecified address signal (YA1, YA2, . . . , YAi, YAFlag). In addition,according to an external address, one word line is selected, therebyselecting one sector (for two pages). The switching between the twopages is effected according to the address.

FIGS. 4A and 4B are sectional views of a memory cell and a selecttransistor, respectively. FIG. 4A shows a memory cell. In a substrate41, n-type diffusion layers 42 acting as the source and drain of amemory cell are formed. Above the substrate 41, a floating gate (FG) 44is formed via a gate insulating film 43. Above the floating gate 44, acontrol gate (CG) 46 is formed via an insulating film 45. FIG. 4B showsa select gate. In the substrate 41, n-type diffusion layers 47 acting asa source and a drain are formed. Above the substrate 41, a control gate49 is formed via a gate insulating film 48.

FIG. 5 is a sectional view of a NAND cell in the memory cell array. Inthis example, in the NAND cell, 16 memory cells MCs configured as shownin FIG. 4A are connected in series. The drain side and source side ofthe NAND cell are provided with a first select gate S1 and a secondselect gate S2 configured as shown in FIG. 4B, respectively.

FIG. 6 is a circuit diagram of the data storage circuit 10 shown in FIG.3. Each of the first and second flag data storage circuits 10 a, 10 bhas the same configuration as that of the data storage circuit 10.

The data storage circuit 10 has a primary data cache (PDC), a secondarydata cache (SDC), a dynamic data cache (DDC), a temporary data cache(TDC). The SDC, PDC, and DDC hold the input data in a write operation,hold the read data in a read operation, hold the data temporarily in averify operation, and are used to manipulate the internal data instoring multivalued data. The TDC not only amplifies the data on the bitline in reading the data and holds the data temporarily, but also isused to manipulate the internal data in storing multivalued data.

The SDC is composed of clocked inverter circuits 61 a, 61 b andtransistors 61 c, 61 d, which constitute a latch circuit. The transistor61 c is connected between the input terminal of the clocked invertercircuit 61 a and the input terminal of the clocked inverter circuit 61b. A signal EQ2 is supplied to the gate of the transistor 61 c. Thetransistor 61 d is connected between the input terminal of the clockedinverter circuit 61 b and the ground. A signal PRST is supplied to thegate of the transistor 61 d. The node N2 a of the SDC is connected via acolumn select transistor 61 e to an input/output data line IO. The nodeN2 b of the SDC is connected via a column select transistor 61 f to aninput/output data line 10 n. A column select signal CSLi is supplied tothe gates of the transistors 61 e, 61 f. The node N2 a of the SDC isconnected via transistors 61 g, 61 h to the node N1 a of the PDC. Asignal BLC2 is supplied to the gate of the transistor 61 g. A signalBLC1 is supplied to the gate of the transistor 61 h.

The PDC is composed of clocked inverter circuits 61 i, 61 j and atransistor 61 k. The transistor 61 k is connected between the inputterminal of the clocked inverter circuit 61 i and the input terminal ofthe clocked inverter circuit 61 j. A signal EQ1 is supplied to the gateof the transistor 61 k. The node N1 b of the PDC is connected to thegate of a transistor 61 l. One end of the current path of the transistor61 l is connected via a transistor 61 m to the ground. A signal CHK1 issupplied to the gate of the transistor 61 m. The other end of thecurrent path of the transistor 61 l is connected to one end of thecurrent path of transistors 61 n, 61 o which constitute a transfer gate.A signal CHK2 n is supplied to the gate of the transistor 61 n. The gateof the transistor 61 o is connected to the junction node of thetransistors 61 g and 61 h. A signal COMi is supplied to the other end ofthe current path of the transistors 61 n, 61 o. The signal COMi is asignal which is common to all of the data storage circuits 10 and whichindicates whether all of the data storage circuits 10 have beenverified. Specifically, when all of the data storage circuits have beenverified, the node N1 b of the PDC goes low. In this state, when thesignals CHK1 and CHK2 are made high, if all of the data storage circuitshave been verified, the signal COMi goes high.

Furthermore, the TDC is composed of, for example, a MOS capacitor 61 p.The capacitor 61 p is connected between the junction node N3 of thetransistors 61 g, 61 h and the ground. The DDC is connected via atransistor 61 q to the junction node N3. A signal REG is supplied to thegate of the transistor 61 q.

The DDC is composed of transistors 61 r, 61 s. A signal VREG is suppliedto one end of the current path of the transistor 61 r. The other end ofthe transistor 61 r is connected to the current path of the transistor61 q. The gate of the transistor 61 r is connected via the transistor 61s to the node N1 a of the PDC. A signal DTG is supplied to the gate ofthe transistor 61 s.

Furthermore, one end of the current path of transistors 61 t, 61 u isconnected to the junction node N3. A signal VPRE is supplied to theother end of the current path of the transistor 61 u. A signal BLPRE issupplied to the gate of the transistor 61 u. A signal BLCLAMP issupplied to the gate of the transistor 61 t. The other end of thecurrent path of the transistor 61 t is connected via a transistor 61 vto one end of bit line BLo and via a transistor 61 w to one end of bitline BLe. The other end of bit line BLo is connected to one end of thecurrent path of a transistor 61 x. A signal BlASo is supplied to thegate of the transistor 61 x. The other end of bit line BLe is connectedto one end of the current path of a transistor 61 y. A signal BlASe issupplied to the gate of the transistor 61 y. A signal BLCRL is suppliedto the other ends of the current paths of the transistors 61 x, 61 y.The transistors 61 x, 61 y are turned on according to signals BlASo,BlASe so as to complement the transistors 61 v, 61 w, thereby supplyingthe potential of a signal BLCRL to the unselected bit lines.

Furthermore, a data input terminal is connected via a plurality ofinverter circuits 62 a, 62 b, 62 c to the input/output data line 10 andfurther via an inverter circuit 62 d to the input/output data line 10 n.

Each of the above signals and voltages is generated by the controlsignal and control voltage generating circuit 7 of FIG. 2. Under thecontrol of the control signal and control voltage generating circuit 7,the operation below will be carried out.

The memory, which is a multivalued memory, enables, for example, twobits of data to be stored in one cell. The switching between the twobits is effected according to the address (a first page, second page).

(Description of Operation)

The operation of the above configuration will be explained.

FIG. 1 shows the relationship between data in a memory cell and thethreshold voltages of the memory cell. When an erase operation iscarried out, the data in the memory cell becomes “0”. As shown in FIG.1A, when a first page is written into, the data in the memory cellbecomes data “0” and data “2”. As shown in FIG. 1B, before a second pageis written into, data lower than the threshold voltage of the actualdata is written into an adjoining cell. Then, because of the datawritten into the cell, the distribution of the threshold voltage of data“2” becomes larger. Thereafter, when the second page is written into,the data in the memory cell becomes data “0” to “3” having the originalthreshold voltage. In the first embodiment, the data in the memory cellis defined, starting from the lowest threshold voltage upward.

The data in a read or a write operation is set as shown in FIGS. 1A to1D, which enables the data to be written into one page of the cell arrayin a plurality of batches. If the power supply is turned off suddenly inthe middle of writing the data into the upper page (or the page writteninto later), the data in the lower page (or the page previously writteninto) is destroyed. However, if the upper page is written into on thebasis of the unwritten data before the upper page is written into, thedata already written up to the threshold voltage v′ is written up to thethreshold voltage b′. In addition, the flag cell is also written into.Thereafter, the upper page is written into, thereby preventing the datain the lower page from being destroyed even if the power supply isturned off abruptly.

The first embodiment is characterized in that, in the second page writeoperation shown in FIG. 1C, the threshold voltage “b” and the thresholdvoltage “c” are verified simultaneously by precharging the bit linetemporarily and then changing the word line potential a plurality oftimes.

FIG. 7 shows the order in which a NAND cell is written into. In a block,data is written in pages, starting from a memory cell closer to thesource line. In FIG. 7, for the sake of explanation, the number of wordlines is set at 4.

In first writing, one bit of data is written into the first page of amemory cell 1.

In second writing, one bit of data is written into the first page of amemory cell 2 adjoining the memory cell 1 in the word direction.

In third writing, one bit of data is written into the first page of amemory cell 3 adjoining the memory cell 1 in the bit direction.

In fourth writing, one bit of data is written into the first page of amemory cell 4 adjoining the memory cell 1 diagonally.

In fifth writing, one bit of data is written into the second page of thememory cell 1.

In sixth writing, one bit of data is written into the second page of thememory cell 2 adjoining the memory cell 1 in the word direction.

In seventh writing, one bit of data is written into the first page of amemory cell 5 adjoining the memory cell 3 in the bit direction.

In eighth writing, one bit of data is written into the first page of amemory cell 6 adjoining the memory cell 3 diagonally.

In ninth writing, one bit of data is written into the second page of thememory cell 3.

In tenth writing, one bit of data is written into the second page of thememory cell 4 adjoining the memory cell 3 in the word direction.

In eleventh writing, one bit of data is written into the first page of amemory cell 7 adjoining the memory cell 5 in the bit direction.

In twelfth writing, one bit of data is written into the first page of amemory cell 8 adjoining the memory cell 5 diagonally.

In thirteenth writing, one bit of data is written into the second pageof the memory cell 5.

In fourteenth writing, one bit of data is written into the second pageof the memory cell 6 adjoining the memory cell 5 in the word direction.

In fifteenth writing, one bit of data is written into the second page ofthe memory cell 7.

In sixteenth writing, one bit of data is written into the second page ofthe memory cell 8 adjoining the memory cell 7 in the word direction.

(Program and Program Verify)

FIG. 8 is a flowchart for a first page program. In a program operation,first, an address is specified, thereby selecting two pages (one sector)shown in FIG. 3. In the memory, of the two pages, programming can bedone only in this order: the first page and then the second page.Therefore, first, the first page is selected according to an address.

While the address is being inputted, the transistor 61 d of FIG. 6 isturned on, thereby setting the nodes N2 a of all the SDCs to Vss (S11).

Next, writing data is externally inputted via the data input/outputlines IO, IOn and is then stored in the SDCs (shown in FIG. 6) in all ofthe data storage circuits 10 (S12). At this time, when data is written,data “0” is externally inputted to the data input terminal 5 a. The datais supplied via the inverter circuits 62 a, 62 b, 62 c, 62 d andtransistors 61 e, 61 f to the SDC. Thus, node N2 a of the SDC goes toVdd. When writing is unselected, data “I” is inputted to the data inputterminal 5 a. Thus, node N2 a of the SDC goes to Vss. Thereafter, when awrite command is inputted, the data in the SDCs of all of the datastorage circuits 10 is transferred to the PDC (S13). Specifically, thesignals BLC1, BLC2 are set to a specific voltage, for example, Vdd+Vth(Vdd: power supply voltage (e.g., 3 V or 1.8 V, this voltage isillustrative and not restrictive), Vth: the threshold voltage of ann-channel MOS transistor), thereby turning on the transistors 61 h, 61g. Then, the data at node N2 a is transferred via the transistors 61 g,61 h to the PDC. Therefore, when data “1” is externally inputted (nowriting is done), node N1 a of the PDC goes low. When data “0” isexternally inputted (writing is done), node N1 a of the PDC goes high.Thereafter, the data in the PDC is at the potential at node N1 a and thedata in the SDC is at the potential at node N2 a.

(Data Invert Operation) (S14)

Thereafter, set VPRE=Vdd and set signal to Vdd+Vth. Then, precharge N3to Vdd temporarily and set DTG=Vdd+Vth. In this state, the data in thePDC is transferred to the DDC. Next, set REG=Vdd and VREG=Vss. If theDDC is at the high level, node N3 is at the low level. If the DDC is atthe low level, node N3 is at the high level. Thereafter, the signalsSEN1, LAT1 are made off temporarily, the signal EQ1 is set at Vdd, andnode N1 a and node N1 b are set at the same potential. Then, the signalBLC1 is set to BLC1=Vdd+Vth and the data in the TDC (the potential atnode N3) is transferred to the PDC. As a result, if data “1” has beenlatched in the PDC, the data in the PDC becomes “0”. If data “0” hasbeen latched in the PDC, the data in the PDC becomes “1”.

When a write command is inputted, a booster circuit for voltages Vpgmand Vpass for programming operates. The potentials of the voltages Vpgmand Vpass do not rise immediately. The data invert operation is carriedout during the waiting time needed for the potential to rise.Consequently, the write speed does not get slower.

As described above, inverting the inputted data is effective in a pagecopy. In a page copy, the data on one page written in the memory cell isread into the page buffer and then written into one other page withoutoutputting the data to the outside. Specifically, when a page copy ismade, reading is done first. As a result, if writing has been done (ifdata “0” has been inputted to the data input terminal 5 a), the SDClatches data “1”. If writing has not been done (if data “1” has beeninputted to the data input terminal 5 a), the SDC latches data “0”. Asdescribed earlier, the SDC latches the inverted inputted data. As aresult, the data read for a page copy coincides with the data latched inthe SDC in a write operation. As described above, making the read-outdata coincide with the data to be next written makes it easy toexternally input and rewrite only a part of the read-out data.Therefore, even when a page copy is not made, the externally inputteddata is always inverted in the page buffer.

The data invert operation is carried out by inputting an ordinaryprogram command. Thereafter, the data in the PDC is copied into the DDC.

In the first page program, no data is written into the flag cell. Thus,the PDCs of the first and second flag data storage circuits 10 a, 10 bhave latched data “1”.

Furthermore, the value of a programmable counter (PC) is initialized to“0”. The counter is provided in, for example, the control signal andcontrol voltage generating circuit 7 of FIG. 2. However, theinstallation location of the counter is not limited to the controlsignal and control voltage generating circuit 7.

(Program Operation) (S15)

First, set the potentials of the signals BLC1, BLCLAMP, and BLSo, orBLSe of FIG. 6 at Vdd+Vth. As a result, the transistors 61 h, 61 t, and61 v or 61 w are turned on, supplying the data stored in the PDC to thebit line. If data “1” is stored in the PDC (if no writing is done), thebit line goes to Vdd. If data “0” is stored in the PDC (if writing isdone), the bit line goes to Vss (the ground potential). The cells whichare connected to the selected word line and which are on the unselectedpage (when the bit line is unselected) must not be written into.Therefore, Vdd is supplied to the bit lines connected to these cells asin the case of data “1”. Here, Vdd is applied to the select line SG1 ofthe selected block, the potential VPGM (20 V) is applied to the selectedword line, and the potential Vpass (10 V) is applied to the unselectedword lines. Then, if the bit line is at Vss, the channel of the cellgoes to Vss and the word line goes to VPGM, with the result that writingis done. If the bit line is at Vdd, the channel of the cell is not atVss and goes to VPGM/2 by coupling when VPGM is raised. Thus, this cellis not programmed.

In a multivalued memory, to narrow the threshold value distribution, theoriginal verify potential “v′” and a verify potential “v*′” lower thanthe original one are set as shown in FIG. 1. An intermediate potential(e.g., 1 V) is supplied to a bit line corresponding to a cell which hasexceeded the verify potential “v*′”, thereby making the write speedslower. Therefore, when the signal VREG is set at Vdd and the signal REGis set at an intermediate potential (e.g., 1 V+Vth), if the bit line isat Vss and the DDC is at the high level, the bit line goes to theintermediate potential. If the DDC is at the low level, the bit lineremains at Vss.

If the bit line is at Vdd, it remains at Vdd.

In the first page write operation, if the input data is “0”, the data inthe memory cell is made “2” as shown in FIG. 1. If the input data is“1”, the data in the memory cell remains at “0”.

As a result of the program operation, the counter (PC) is counted up(PC=PC+1).

(First Page Verify) (S16)

At the first page, data is written to the original verify potential “v′”as shown in FIG. 1A. Thus, in a first step of the verify operation, apotential “v*′” lower than the original verify potential “v′” issupplied to the word line. In a second step, the potential of the wordline is raised to “v′” and verification is performed. Hereinafter, “*”represents a potential lower than the original one.

First, a read potential Vread is supplied to the unselected word linesand select line SG1 in the selected block. In the data storage circuit10 of FIG. 6, for example, Vdd+Vth is supplied to the signal BLPRE and aspecific voltage, for example, 1 V+Vth, is supplied to the signalBLCLAMP. The signal VPRE is set at Vdd and the bit line is precharged to1 V.

Next, the select line SG2 on the source side of the cell is made high.The cells whose threshold voltage is higher than the potential “v*′” areturned off. As a result, the bit line remains at the high level. Thecells whose threshold voltage is lower than the potential “v*′” areturned on. As a result, the bit line goes to Vss.

Next, a specific voltage, for example, Vdd+Vth, is supplied to thesignal BLPRE and VPRE is set at Vdd. This causes node N3 of the TDC tobe precharged to Vdd. Then, the signal BLCLAMP is set at a specificvoltage, for example, 0.9 V+Vth, thereby turning on the transistor 61 t.Node N3 of the TDC goes low when the bit line is at the low level,whereas node N3 goes high when the bit line is at the high level.

Here, when writing is done, the low level has been stored in the DDC ofFIG. 6. When no writing is done, the high level has been stored in theDDC. Thus, when the signal VREG is set at Vdd and the signal REG is madehigh, only if no writing is done, node N3 of the TDC is forced to gohigh. After this operation, the data in the PDC is transferred to theDDC and the potential in the TDC is transferred to the PDC. It is onlywhen the cell is not written into or when data “2” has been written inthe cell and the threshold voltage of the cell has reached the verifypotential “v*′” that a high level signal is latched in the PDC. Inaddition, it is only when the threshold voltage of the cell has notreached “v*′” that a low level signal is latched in the PDC.

Next, when the potential of the word line is raised from “v*′” to “v′”,the cells whose threshold voltage is lower than the threshold voltage“v′” are turned on and the bit lines go to Vss.

Next, a specific voltage, for example, Vdd+Vth, is supplied to thesignal BLPRE and VPRE is set at Vdd. This causes node N3 of the TDC tobe precharged to Vdd. Then, the signal BLCLAMP is set at a specificvoltage, for example, 0.9 V+Vth, thereby turning on the transistor 61 t.Node N3 of the TDC goes low when the bit line is at the low level,whereas node N3 goes high when the bit line is at the high level.

Here, when writing is done, the low level has been stored in the DDC ofFIG. 6. When no writing is done, the high level has been stored in theDDC. Thus, when the signal VREG is set at Vdd and the signal REG is madehigh, only if no writing is done, node N3 of the TDC is forced to gohigh. After this operation, the data in the PDC is transferred to theDDC and the potential in the TDC is transferred to the PDC. It is onlywhen the cell is not written into or when data “2” has been written inthe cell and the threshold voltage of the cell has reached the verifypotential “v′” that a high level signal is latched in the PDC. Inaddition, it is only when the threshold voltage of the cell has notreached “v′” that a low level signal is latched in the PDC.

As a result, it is when the threshold voltage of the cell has exceeded“v*′” or when writing is unselected that the DDC goes high. It is whenwriting has been done and the threshold voltage of the cell is equal toor lower than “v*′” that the DDC goes low. It is when the thresholdvoltage of the cell has exceeded “v′” or when writing is unselected thatthe PDC goes high. It is when writing has been done and the thresholdvoltage of the cell is equal to or lower than “v′” that the PDC goeslow.

When the PDC is at the low level, the write operation is carried outagain. The program and verify operation is repeated until the data inall of the data storage circuits 10 has become high (S15 to S18). Atthis time, when the PDC is at the low level and the DDC is at the highlevel, that is, when the threshold voltage of the cell is equal to orhigher than “v*′” or equal to “v′”, the intermediate potential issupplied to the bit line, thereby suppressing the write speed.

(Adjoining Cell Program)

As shown in FIG. 7, after one bit of data is written into the first pageof the memory cell 1, the writing of data into the first page of thememory cell 2 adjoining the memory cell 1 in the word direction, thewriting of data into the first page of the memory cell 3 adjoining thememory cell 1 in the bit direction, and the writing of data into thefirst page of the memory cell 4 adjoining the memory cell 1 diagonallyare effected in that order. When these write operations have beencarried out, the threshold voltage of the memory cell 1 rises due to thecapacitance between the floating gates of the adjoining cells (the FG-FGcapacitance), depending on writing data. Accordingly, the thresholdvoltage distribution of data “0” and data “2” in the memory cell 1expand toward a higher potential as shown in FIG. 1B.

Thereafter, in the fifth writing, one bit of data is written into thesecond page of the memory cell 1.

(Second Page Program)

In the first embodiment, a second page program operation and a verifyoperation are made faster. Specifically, data “2” and data “3” in thememory cell are verified simultaneously, thereby enabling a higher-speedoperation. Hereinafter, the operation will be explained.

FIG. 9 is a flowchart for a second page program (write) operation. Inthe second page program operation, too, two pages shown in FIG. 3 areselected according to an address. At the same time, the page buffer isreset (S21).

Next, writing data is externally inputted and then is stored in the SDCsin all of the data storage circuits (S22). If data “1” is externallyinputted (if no writing is done), node N2 a of the SDC of the datastorage circuit 10 goes low. If data “0” is externally inputted (ifwriting is done), node N2 a goes high.

(First Flag Cell Data Load) (S23)

In the second page program, when a write command is inputted, the SDC inthe first flag cell data storage circuit 10 a goes high to write datainto the first flag cell FC1. As described earlier, a plurality of flagcells may be provided to increase the reliability. In the second page,the SDC corresponding to the first flag cell FC1 goes high. In the firstflag cell FC1, data “0” is replaced with data “1”.

The SDC corresponding to the second flag cell FC2 is made low. As aresult, writing is done to data “0” in the second flag cell FC2. In asubsequent operation, writing is done to data “2”.

In the second page program, as shown in FIG. 1C, when the data in thememory cell is “0” and when externally inputted data is “1”, the data inthe memory cell is caused to remain at “0”. When externally inputteddata is “0”, the data in the memory cell is made “l”.

When the data in the memory cell is “2” and when externally inputteddata is “I”, the data in the memory cell is caused to remain at “2”.However, in the first page write operation, the threshold voltage of thememory cell has risen only to “v′”, lower than the threshold voltage ofthe original data “2”. Therefore, these cells are written into until theoriginal threshold voltage “b′” of data “2” has been reached.

In addition, when the data in the memory cell is “2” and when externallyinputted data “0”, the data in the memory cell is made “3”.

(Internal Data Read) (S24)

First, before a cell is written into, an internal read operation iscarried out to determine whether the data in the cell on the first pageis “0” or “2”. An internal read operation is the same as a readoperation. In determining whether the data in an ordinary cell is “0” or“2”, a read potential “b” is applied to the selected word line. However,in the first page program operation, since the verify potential is “v*′”lower than the normal verify potential “v′”, it might be lower than thepotential “b”. Therefore, in the internal data load operation, a readoperation is carried out by supplying a potential “a” to the word line.

Specifically, a potential Vread is applied to the unselected word linesand select line SG1 in the selected block. In addition to this, thesignal VPRE of the data storage circuit 10 is set at Vdd, the signalsBLPRE and BLCLAMP are set at a specific voltage, such as 1 V+Vth, andthe bit line is precharged to Vdd. Then, the select line SG2 on thesource side of the cell is made high. Since the cells whose thresholdvoltage is higher than the potential “a” are turned off, the bit lineremains high. Since the cells whose threshold voltage is lower than thepotential “a” are turned on, the bit line is discharged and goes to theground potential Vss.

Next, the signal VPRE of the data storage circuit 10 is set at Vdd, thesignal BLPRE is set at Vdd+Vth, and node N3 of the TDC is precharged toVdd. Thereafter, the signal BLCLAMP is set at 0.9 V+Vth. Node N3 of theTDC goes low when the bit line is at the low level and goes high whenthe bit line is at the high level. Thereafter, the potential of the TDCis transferred to the PDC. As a result, when the data in the memory cellis “2”, a high-level signal is latched in the PDC. When the data in thememory cell is “0”, a low-level signal is latched in the PDC. FIG. 10Ashows the relationship between the SDC, PDC and the data in the memorycell after data load and internal read operations.

(Data Cache Setting) (S25)

Thereafter, the data stored in each data cache is manipulated accordingto the data cache setting procedure shown in FIGS. 11 and 12.Specifically, in a state where data is externally inputted and the dataread by an internal read operation is latched in each data cache asshown in FIG. 11A, the data in the SDC is transferred to the PDC and thedata in the PDC is transferred to the DDC as shown in FIG. 11B. Next, asshown in FIG. 11C, the data in the DDC is inverted and the inverted datais transferred to the SDC. Thereafter, the data in the PDC istransferred to the DDC. Next, as shown in FIG. 12A, the data in the DDCis inverted and the inverted data is transferred to the PDC. Thereafter,the data in the PDC is transferred to the DDC. Next, as shown in FIG.12B, data for the second flag cell FC2 is loaded into the second flagcell data storage circuit 10 b and is latched in the SDC. Then, as shownin FIG. 12C, the data in SDC is combined with the data in the DDC. Thecombined data is inverted and the inverted data is transferred to thePDC. The data in the PDC is transferred to the DDC.

As a result of such an operation, the data stored in each data cachetakes the values as shown in FIG. 10B and FIG. 12C.

Specifically, when the data in the memory cell is made “0” (data “1” onthe first page and data “1” on the second page), all of the PDC, DDC,and SDC are set to the high level.

When the data in the memory cell is made “1” (data “1” on the first pageand data “0” on the second page), the PDC is set to the low level, theDDC is set to the low level, and the SDC is set to the high level.

When the data in the memory cell is made “2” (data “0” on the first pageand data “1” on the second page), the PDC is set to the low level, theDDC is set to the high level, and the SDC is set to the low level.

When the data in the memory cell is made “3” (data “0” on the first pageand data “O” on the second page), all of the PDC, DDC, and SDC are setto the low level.

(Second Flag Cell Data Load) (S25)

As described above, in the course of setting the data cache, the SDC inthe second flag cell data storage circuit 10 b is set to the low level.As a result, the data in the second flag cell FC2 changes from “0” to“2”. A second page write operation is to do writing from data “0” to “1”in the memory cell and from data “2” to “3” in the memory cell as shownin FIG. 1C. As for the second flag cell, the memory cell is programmedfrom data “0” to data “2” in the second page write operation. Therefore,as shown in FIG. 1D, the distribution of the threshold voltage of data“2” in the second flag cell might expand as shown in FIG. 1D.

However, since the read operation of the second flag cell FC2 is carriedout by always supplying the level of “b” lower than “b′” to the wordline, there is no problem.

In addition, for example, in the course of setting each data cache, thecounter (PC) is initialized to “0” (S25).

Thereafter, it is determined whether data has bee written into the firstflag cell FC1 (S26). The data in the first flag cell FC has been readout in the internal read operation (S24). If no data has been writteninto the first flag cell FC1, control proceeds to the program operation(S27). If data has been written in the first flag cell FC1, the internalread operation is carried out again using the level of “b” (S26 to S23).

(Program) (S27)

When no data has been written in the first flag cell FC1, data iswritten into the memory cell. For example, after the counter (PC) iscounted up, when the signal BLC1 is set at Vsg, if the PDC has data “0”,the bit line is at Vss. If the PDC has data “l”, the bit line is at Vdd.Next, the signal BLC1 is set to Vss and then the signal VREG is set toVdd, and the signal REG is set to the intermediate potential+Vth (1V+Vth). Then, if the DDC has data “1”, the bit line is at Vdd. If theDDC has data “0”, the bit line is not precharged. As a result, only whendata “1”, “3” have been written in the memory cell, the bit line is atVss. When data “2” has been written in the memory cell, the bit line isat the intermediate potential (1 V). If the data in the memory cell is“0” (if no writing is done), the bit line is at Vdd. Here, the selectedword line is set at Vpgm and the unselected word line is set at Vpass.If the bit line is at Vdd, no writing is done. If the bit line is atVss, writing is done. If the bit line is at the intermediate potential(1 V), writing is done a little. Accordingly, a memory cell in whichdata “2” has been written might be written into insufficiently. Thereason for this is that, since data “2” and data “3” are verifiedsimultaneously, the write time ends earlier when they are written assimultaneously as possible. Therefore, the intermediate potential issupplied to the bit line.

Thereafter, when data “1” has been written in the memory cell (S28) andthe value of the counter (PC) is smaller than the maximum number ofverify operations using the predetermined verify voltage “a′” (S29), awrite verify operation is carried out by setting the verify voltages“a*′” and “a′” in sequence (S30).

In the explained below, a verify operation is carried out by setting theverify voltages “a*′”, “a′”, “b′”, “b′”, and “c′” in that order. At thistime, to perform a program operation and a verify operation skippingunnecessary verify operations, the value of the counter (PC) is comparedwith a predetermined value (S29, S31, S32, S34, S37). For example, ifthe number of verify operations using the verify voltages “a*′” and “a′”has reached the maximum number of loops, verify operations using “a*′”and “a′” are skipped. In addition, for example, if the number of verifystarts using the verify voltage “b′” has not been reached, a verifyoperation using “b′” is skipped and the program is executed. Each valueneeded to control the skips is set as follows: for example,

The maximum number of loops=10 using verify voltage “a′”

The number of verify starts=4 using verify voltage “b′”

The number of verify starts=8 using verify voltage “c′”

The maximum number of program loops=20

(Verify “a*′”, “a′”) (S30)

In the verify operation, when the signal VPRE is set to the high leveland the signal BLCLAMP is set to a specific potential, the bit line isprecharged.

FIG. 13A shows the data set in each data cache after a verify operationusing the verify voltage “a*′”.

Next, the potential of the word line is set to the verify potential“a*′” and the bit line is discharged. The signal VPRE is set to Vdd andthe signal BLPRE is set to Vsg and the TDC is charged to Vdd. Then, aspecific voltage is supplied to the signal BLCLAMP. If the bit line isat Vss, the TDC goes to Vss (low level). If the precharge potentialremains on the bit line, the TDC goes to Vdd (high level). Here, thesignal BLC2 is set at Vth+0.5 V. If the SDC has “0” (if data “2”, “3”have been written in the memory cell), the TDC goes to Vss. Thus, it iswhen data “1” has been written in the memory cell and the verifypotential “a*′” has been reached that the TDC goes to Vdd. If data “1”has not been written in the memory cell, the bit line has not beenprecharged, with the result that the TDC is at the low level. If data“1” has been written in the memory cell and the verify potential “a*′”has not been reached, the TDC is at Vss.

Here, when the signal VREG is made high and the signal REG is made high,if the data in the DDC is “1”, the TDC is forced to go high. Therefore,it is when data “1” has been written in the memory cell and the verifypotential “a*′” has been reached or when the data in the DDC is “1”,that is, data “2” has been written in the memory cell that the TDC goesto Vdd. Then, the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC. Thereafter, the signal BLC1 is set to Vsg and thepotential of the TDC is loaded into the PDC.

In FIG. 13B, it is when data “1” has been written in the memory cell andthe verify potential “a*′” has been exceeded or when data “2” has beenwritten in the memory cell that the PDC has data “1”.

Next, the potential of the word line is raised a little to produce averify potential “a′” and the bit line is discharged. After the signalVPRE is set to Vdd, the signal BLPRE is set to Vsg, and the TDC ischarged to Vdd again, a specific voltage is supplied to the signalBLCLAMP. If the bit line is at Vss, the TDC is at Vss. If the prechargepotential is left on the bit line, the TDC is at Vdd. Here, when thesignal BLC2 is set to Vth+0.5 V, if the SDC has “0” (when data “2”, “3”have been written in the memory cell), the TDC is at Vss. Thus, it iswhen data “1” has been written in the memory cell and the verifypotential “a′” has been reached that the TDC goes to Vdd. The TDC goesto Vss when data “1” has not been written in the memory cell or whendata “1” has been written in the memory cell and the verify potential“a′” has not been reached.

Here, when the signal VREG is made high and the signal REG is made high,if the data in the DDC is “1”, that is, if no data has been written inthe memory cell, the TDC is forced to go high. It is when writing isunselected or when data “1” has been written in the memory cell and theverify potential “a′” has been reached that the TDC goes to Vdd.

Then, after the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC, the signal BLC1 is set to Vsg and the potential ofthe TDC is loaded into the PDC (see FIG. 14).

In a cell where data “1” has been written in the memory cell, when thethreshold voltage becomes higher than the verify potential “a*′”, thedata in the DDC becomes “1′” (high level). In a cell where data “1” hasbeen written in the memory cell, when all of the write operations usingthe verify potential “a′” have been completed, the data in the PDCbecomes “1” (high level).

Thereafter, when the value of the counter (PC) is larger than the numberof verify starts using a predetermined verify voltage “b′” (S31) andsmaller than the number of verify starts using a predetermined verifyvoltage “c′” (S32), the verify potential “b” is set and a write verifyoperation is carried out (533).

(Verify “b′”) (S33)

A verify operation using the verify potential “b” (see FIG. 15). Sincethe writing of data “2” into the memory cell is completed earlier thanthe writing of data “3”, only the verify potential “b” is verifiedfirst. The signal VPRE is set to Vdd and the signal BLCLAMP is set to aspecific potential, thereby precharging the bit line. Next, the verifypotential “b′” is supplied to the word line and the bit line isdischarged. While the bit line is being discharged, the data in the DDCis transferred to the TDC. Thereafter, the data in the PDC istransferred to the DDC and the data in the TDC is transferred to thePDC. Then, the TDC is charged to Vdd. Thereafter, the signal BLCLAMP isset to a specific potential.

Then, it is when the threshold voltage of the cell is equal to or higherthan the verify potential “b′” that the TDC goes high. Here, when thesignal BLC1 is set at Vth+0.5 V, if the PDC has “0” (when data “3” hasbeen written in the memory cell or when data “i” has been written in thememory cell and the threshold voltage of the cell is equal to or lowerthan the verify potential “a*′”), the TDC goes to Vss. Thus, it is whendata “2” has been written in the memory cell and the verify potential“b′” has been reached that the TDC goes to Vdd. Next, when the signalVREG is made high and the signal REG is set to Vsg, if the data in theDDC is at the high level, the TDC is forced to go high. Therefore, it iswhen data “2” has been written in the memory cell and the verifypotential “b′” has been reached or when writing is unselected that theTDC goes to Vdd. After the signal DTG is set to Vsg and the data in thePDC is copied into the DDC, the signal BLC1 is set to Vsg and thepotential of the TDC is loaded into the PDC.

Thereafter, when the value of the counter (PC) is larger than the numberof verify starts using the verify voltage “c′” (S34), a simultaneousverify operation using verify potentials “b” and “c” is carried out(S34, S35).

(Simultaneous Verification Using Verify Potentials “b”, “c”) (FIG. 16)

In the course of repeating the program and verify operation a pluralityof times, the writing of data into a cell where data “3” is beingwritten into the memory cell is completed. Therefore, instead of theverify operation using the verify potential “b”, a simultaneous verifyoperation is carried out using the verify potentials “b” and “c”. First,the signal BLPRE is set to the high level and the signal BLCLAMP is setto a specific potential, thereby precharging the bit line.

Next, the verify potential “b′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC. Thereafter, the data in thePDC is transferred to the DDC and the data in the TDC is transferred tothe PDC.

Then, after the TDC is charged to Vdd, a specific potential is suppliedto BLCLAMP. Therefore, it is when the threshold voltage is equal to orhigher than the verify potential “b′” that the TDC goes high. Here, whenthe signal BLC1 is set to Vth+0.5 V, if the PDC has “0” (when data “3”has been written in the memory cell or when data “1” has been written inthe memory cell and the threshold voltage is equal to or lower than theverify potential “a*′”), the TDC goes to Vss. Therefore, it is when data“2” has been written in the memory cell and the verify potential “b′”has been reached that the TDC goes to Vdd. Next, when the signal VREG ismade high and the signal REG is set to Vsg, if the data in the DDC is atthe high level, the TDC is forced to go high. Therefore, it is when data“2” has been written in the memory cell and the verify potential “b′”has been reached or when writing is unselected that the TDC goes to Vdd.After the signal DTG is set to Vsg and the data in the PDC is copiedinto the DDC, the signal BLC1 is set to Vsg and the potential of the TDCis loaded into the PDC.

Next, the verify potential “c′” is supplied to the word line and the bitline is discharged. While the bit line is being discharged, the data inthe DDC is transferred to the TDC. Thereafter, the data in the PDC istransferred to the DDC and the data in the TDC is transferred to thePDC.

Then, after the TDC is charged to Vdd, a specific potential is suppliedto BLCLAMP. It is when data “3” has been written in the memory cell andthe verify potential “c′” has been reached that the TDC goes to Vdd.Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “2” has been written in the memorycell and the verify potential “c′” has been reached or when writing isunselected that the TDC goes to Vdd. After the signal DTG is set to Vsgand the data in the PDC is copied into the DDC, the signal BLC1 is setto Vsg and the potential of the TDC is loaded into the PDC.

In this way, the program and verify operation is repeated until the datain all of the PDCs has become “1” (S36, S37). However, when the data inthe DDC is “1” in a write operation, that is, when data “2” has beenwritten in the memory cell or when data “1” has been written in thememory cell and the verify potential “a*′” has been exceeded, the bitline is set to the intermediate potential and a write operation iscarried out.

Each time the program and verify operation is repeated, the programvoltage Vpgm is raised little by little. An increment ΔVpgm in theprogram voltage Vpgm differs between the first page write operation andthe second page write operation. For example, an increment ΔVpgm in thefirst page write operation is set larger than an increment ΔVpgm in thesecond page write operation.

In the algorithm of FIG. 9, after program and verify “a*, a′” arerepeated several times, program and verify “a*′, a′” and program verify“b′” are repeated several times, and program and verify “a*′, a′” andprogram verify “b′, c′” are repeated several times. In the middle ofrepeating the operations, the writing of data “1” into the memory cellis completed earlier. Therefore, when the cells into which data “1” isto be written have run out, program verify “a*′, a′” is skipped andprogram and program verify “b′” or program and program verify “b′, c′”are repeated. When program and verify “a*′, a′” are skipped, the SDC isnot used. Therefore, the next program data can be inputted. However,there may be a cell where data “1” is difficult to write into the memorycell. Therefore, the number of times of program verify “a*, a′” islimited (S29).

In the first embodiment, the data on the first page (lower page) iswritten into the memory cell. Thereafter, when the data on the secondpage (upper page) is written into the memory cell, the data on the firstpage is read out and threshold voltages of three levels are written.However, the data on the first page and the data on the second page maybe written into the memory cell at the same time.

FIG. 17 shows a modification of the first embodiment. The same parts asthose in FIG. 9 are indicated by the same reference numerals. As shownin FIG. 17, the data storage circuits are reset and the counter (PC) isinitialized (S51). Thereafter, the data on the first page is loaded intothe SDC (S52). Then, the data on the first page is transferred from theSDC to the PDC (S53). Next, the data on the second page is loaded intothe SDC (S54). Thereafter, each data cache is set as shown in FIG. 10B(S55). According to the data in the data cache, the program is executed(S56).

In such a method, since the data on the first page and the data on thesecond page are written into the memory cell simultaneously, the data onthe first page need not be read out for a write operation and internaldata read only for the first page. This enables a higher speed writeoperation.

(First Page Read)

FIG. 18A is a flowchart for a first page read operation. First, anaddress is specified, thereby selecting two pages shown in FIG. 3. Asshown in FIGS. 1B and 1C, the distribution of threshold voltage differsbefore and after the second page is written into. Therefore, thepotential of the word line is set to “b” and a read operation is carriedout. Then, it is determined whether the data in the second flag cell iseither “0” or “1” (S71, S72). In this determination, if there are aplurality of flag cells, it is decided by the majority of the flag cellswhether the data in the second flag cell is either “0” or “1”.

If the data read from the second flag cell is “0” (the data in thememory cell is “2”), this means that the second page has been writteninto. Thus, the distribution of threshold voltage of the cell is asshown in FIG. 1C. To determine the data in such a cell, a read operationis carried out using the word line potential “b”. However, in step S71,the result of performing a read operation using the word line potential“b” has been already read into the data storage circuit. Therefore, thedata stored in the data storage circuit is outputted to the outside(S73).

On the other hand, if the data read from the flag cell is “I” (the datain the memory cell is “0”), this means that the second page has not beenwritten into. The distribution of threshold voltage of the cell is asshown in FIG. 1A or 1B. To determine the data in these memories, a readoperation has to be carried out using the word line potential “a”.Therefore, a read operation is carried out using the word line potential“a” (S74). Thereafter, the data read into the data storage circuit isoutputted to the outside (S73).

(Read Operation: First Page Read)

As described above, in the first page read operation, the read potential“a” or “b” is supplied to the selected word line, thereby performing theread operation.

First, a read voltage Vread is supplied to the unselected word lines andselect line SG1 in the selected block. The signal BLPRE is set to 1V+Vth and BLCLAMP is set to Vdd+Vth in the data storage circuit shown inFIG. 6, thereby precharging the bit line. Thereafter, the select lineSG2 on the source side of the cell is made high. Since the cells whosethreshold voltage is higher than the potential “a” or “b” are turnedoff, the bit line remains at the high level. In addition, since thecells whose threshold voltage is lower than the potential “a” or “b” areturned on, the bit line goes to Vss.

Next, the signal BLPRE of the data storage circuit 10 is set to Vdd+Vth,thereby turning on the transistor 61 u, which precharges node N3 of theTDC to Vdd. Thereafter, the signal BLCLAMP is set to the intermediatepotential (e.g., 0.9 V+Vth), thereby turning on the transistor 61 t.Node N3 of the TDC goes low when the bit line is at the low level andgoes high when the bit line is at the high level.

Next, the signal BLC1 is set to Vsg (Vdd+Vth), thereby loading thepotential of the TDC into the PDC. Thereafter, the data in the PDC istransferred to the SDC. If the data in the second flag cell FC2 is “l”(if no data has been written), the read level is changed and the cell isread from again.

(Second Page Read)

FIG. 18B is a flowchart for a second page read operation. In the secondpage read operation, an address is specified, thereby selected two pagesshown in FIG. 3. As shown in FIGS. 1B and 1C, the distribution ofthreshold voltage differs before and after the second page is writteninto. However, after the second page is written into, the distributionis as shown in FIG. 1C. For this reason, a read operation has to becarried out by changing the word line potential three times in thisorder: “a”, “b”, “c”. However, in a write operation, a verify operationwith “c” is carried out by only changing the word line potential after averify operation with “b”. Thus, it is desirable that a read operationshould be the same as a verify operation. Therefore, a read operationwith “b” and that with “c” are carried out simultaneously.

Specifically, first, read operations are carried out simultaneously withthe word line potentials “b” and “c” (S81). Thereafter, a read operationis carried out using the word line potential “a” (S82). When thethreshold voltage of the memory cell is lower than the word linepotential “a” or when the threshold voltage is higher than word linepotential “b” and lower than the word line potential “c”, data isdetermined to be “1”. In addition, when the threshold voltage of thememory cell is higher than the word line potential “a” and lower thanthe word line potential “b” or when the threshold voltage is higher thanword line potential “c”, data is determined to be “0”. Before the secondpage is written into, “I” should be outputted as the data on the secondpage. However, the distribution of threshold voltage is as shown in FIG.1A. Thus, when the same read operation as after the second page iswritten into is carried out, the output data might be “O”. Therefore, itis determined whether the data in the first flag cell FC1 is either “0”or “1” (S83). If the result has shown that the data in the first flagcell FC1 is “1” and the second page has not been written into, theoutput data is fixed to “1” (S84). To fix the output data to “1”, thesignal PRST of the data storage circuit is made high and the SDC is setto “1”. Alternatively, the data input/output buffer of FIG. 2 is causedto output only data “1”. In addition, if the data in the first flag cellFC1 is “0”, the read-out data is outputted (S85).

In the second page read operation, the following operation is carriedout.

(Read Operation: Second Page Read First Session)

In a first session of the second page read operation, as in thesimultaneous verification using “b” and “c” in a program verifyoperation, after the bit line is precharged, the read potential “b” issupplied to the word line. In this state, the data is read from thememory cell. In the middle of the read operation, the potential of theword line is changed to the read potential “c” and the read operation isperformed (S81).

First, the read voltage Vread is supplied to the unselected word linesand select line SG1 in the selected block. The signal BLPRE is set to 1V+Vth and BLCLAMP is set to Vdd+Vth in the data storage circuit shown inFIG. 6, thereby precharging the bit line. Thereafter, the select lineSG2 on the source side of the cell is made high. Since the cells whosethreshold voltage is higher than the potential “b” are turned off, thebit line remains at the high level. In addition, since the cells whosethreshold voltage is lower than the potential “b” are turned on, the bitline goes to Vss.

Next, the signal BLPRE of the data storage circuit is set to Vdd+Vth,thereby turning on the transistor 61 u, which precharges node N3 of theTDC to Vdd. Thereafter, the signal BLCLAMP is set to 0.9 V+Vth, therebyturning on the transistor 61 t. Node N3 of the TDC goes low when the bitline is at the low level and goes high when the bit line is at the highlevel. Next, the signal BLC1 is set to Vsg (Vdd+Vth), thereby loadingthe potential of the TDC into the PDC.

Next, the word line potential is changed to “c”. Since the cells whosethreshold voltage is higher than the potential “c” are turned off, thebit line remains at the high level. In addition, since the cells whosethreshold voltage is lower than the potential “b” are turned on, the bitline goes to Vss. While the bit line is being discharged, the signal DTGis set to Vdd+Vth, thereby copying the data in the PDC into the DDC.

Next, the signal BLPRE of the data storage circuit 10 is set to Vdd+Vth,thereby turning on the transistor 61 u, which precharges node N3 of theTDC to Vdd. Thereafter, the signal BLCLAMP is set to 0.9 V+Vth, therebyturning on the transistor 61 t. Node N3 of the TDC goes low when the bitline is at the low level and goes high when the bit line is at the highlevel. Next, the signal BLC1 is set to Vsg(Vdd+Vth), thereby loading thepotential of the TDC into the PDC.

(Read Operation: Second Page Read Second Session)

In a second session of the second page read operation, the readpotential “a” is supplied to the selected word line, thereby conductinga read operation (S82).

First, the read voltage Vread is supplied to the unselected word linesand select line SG1 in the selected block. In this state, the signalsBLPRE, BLCLAMP in the data storage circuit 10 are set to 1 V+Vth,thereby precharging the bit line. Thereafter, the select line SG2 on thesource side of the cell is made high. Since the cells whose thresholdvoltage is higher than the word line potential “a” are turned off, thebit line remains at the high level. In addition, since the cells whosethreshold voltage is lower than the word line potential “a” are turnedon, the bit line goes to Vss.

Next, the signal BLPRE of the data storage circuit 10 is set to Vdd+Vth,thereby precharging node N3 of the TDC to Vdd. Thereafter, the signalBLCLAMP is set to Vdd+Vth, thereby turning on the transistor 61 t. Node3 of the TDC goes low when the bit line is at the low level and goeshigh when the bit line is at the high level.

While the bit line is being discharged, the signal VPRE is set to Vssand the signal BLPRE is set to Vdd+Vth, thereby putting the TDC to Vsstemporarily. Thereafter, the signal REG is set to Vdd+Vth and the signalVREG is set to Vdd. If the DDC is at the high level, the TDC is madehigh. That is, the data in the DDC is copied into the TDC. Next, thesignal is DTG is set to Vdd+Vth, thereby copying the data in the PDCinto the DDC. Then, the signal VREG is set to Vss and the signal REG isset to Vdd. If the DDC is at the high level, the TDC is forced to golow. Thereafter, the signal BLC1 is set to Vdd+Vth, thereby loading thepotential of the TDC into the PDC. It is when the threshold voltage hasexceeded the “b” level and is equal to or lower than the “c” level inthe first read operation that the PDC goes high. In addition, it is whenthe threshold voltage is equal to or lower than the “b” level or isequal to or lower than the “c” level that the PDC goes low.

Next, the signal BLPRE of the data storage circuit 10 is set to Vdd+Vth,thereby turning on the transistor 61 u, which precharges node N3 of theTDC to Vdd. Thereafter, the signal BLCLAMP is set to 0.9 V+Vth, therebyturning on the transistor 61 t. Node 3 of the TDC goes low when the bitline is at the low level and goes high when the bit line is at the highlevel. Next, the signal DTG is set to Vdd+Vth, the signal REG is set toVdd, and the signal VREG is set to Vss. If the PDC is at the high level,the TDC is forced to go to Vss. Then, the signal BLC1 is set to Vsg(Vdd+Vth), thereby loading the potential of the TDC into the PDC. As aresult, it is when the threshold voltage of the memory cell is higherthan the word line potential “a” and lower than the word line potential“b” or when the threshold voltage is higher than the word line potential“c” that the PDC goes high. Thereafter, the data in the PDC istransferred to the SDC.

When the data in the first flag cell FC1 is “I” (when no data has beenwritten), the second page has not been written into. Therefore, theoutput data is fixed to “1” and the data is outputted (S84).

In the above explanation, the potential of the word line has beenchanged to “b” and “c” in the first precharging of the bit line, therebyreading the data in the memory cell. Then, the bit line has beenprecharged again, thereby reading the data with the word line potential“a”. Alternatively, the data in the memory cell may be read by changingthe potential of the word line in the order of “a”, “b”, “c” in thefirst precharging of the bit line.

(Erase)

In an erase operation, an address is specified first, thereby selectinga block shown by a broken line in FIG. 3. Next, the potential of a wellwhere cells are formed is raised to a high voltage (about 20 V), theword line of the selected block is set to Vss, and the word lines of theunselected blocks are made floating. Then, a high voltage is appliedbetween the cells of the selected block and the well, which erases thedata stored in the cells. On the other hand, in the unselected blocks,since the word lines are in the floating state, when the well is raisedto a high voltage, the word lines are also raised to a high voltage bycapacitive coupling. As a result, the data stored in the memory cells inthe unselected blocks are not erased.

After an erase operation, the data in the memory cells become “0”. Evenif either the first or the second page read operation is carried out,data “1” is outputted.

With the first embodiment, in the second-page program verify operation,data “2” and data “3” are verified simultaneously using the verifyvoltages “b′” and “c′”. Therefore, to conduct two verify operations, thebit line is precharged once and the word line potential is set only to“b′” and “c′”. Consequently, the number of precharges of the bit linerequiring a long time can be decreased, which improves the verify speed.

Furthermore, in the second page read operation, data “2” and data “3”are read by precharging the bit line once and setting the word linepotential to “b” and “c”. Thus, the number of precharges can be reduced,which improves the read speed.

Moreover, in a program verify operation and a read operation, the bitline is precharged and then the potential of the word line is changed.This enables a program verify operation and a read operation to becarried out under the same conditions, which improves the readingaccuracy.

In the second page write operation, the maximum number of loops whichdetermines the number of executions of verify operations using “a′” isset. When the value of the counter (PC) has reached the maximum numberof loops, the verify operation using “a′” is ended. As a result, thesecond page write time can be made shorter.

Furthermore, in the first embodiment, the data on the first page iswritten into the memory cell using a potential lower than the originalthreshold voltage, the data on the first page is written into theadjoining memory cell before the data on the second page is written, andthe data on the second page is written into the memory cell after theadjoining memory cell is written into, thereby setting the originalthreshold voltage corresponding to the stored data. Since the data onthe first page is written into the memory cell, taking into account theFG-FG capacitance of the adjoining memory cell, the threshold voltagecorresponding to multivalued data can be set accurately.

When the data on the second page is written, data is written into theflag cell. In reading the data on each page, the externally outputteddata is controlled according to the data stored in the flag cell.Therefore, the data on each page can be outputted reliably.

In the prior art, when part of the data read from, for example, thememory cell is replaced with the externally inputted data and theresulting data is written, that is, when a so-called page copy is made,a transistor 62 e is inserted between the inverter circuit 62 c and theinverter 62 d and a transistor 62 f is connected in parallel with theinverter circuit 62 c and the transistor 62 e as shown by a broken linein FIG. 6. In such a conventional configuration, when a program commandis inputted in the middle of a page copy, the data read from the memorycell is inverted in logic level with respect to the data supplied fromthe data input terminal 5 a and the result is latched in the SDC.Therefore, it is necessary to cause the data supplied from the datainput terminal 5 a to coincide in logic level with the data latched inthe SDC. Accordingly, in a page copy, the transistor 62 e is turned onand the transistor 62 f is turned off by complementary signals φ, /φ,thereby inverting the writing data. The resulting data is supplied tothe SDC.

However, with the first embodiment, in a page copy, the data read fromthe memory cell is inverted and the inverted data is latched in the SDC.The data from the data input terminal 5 a is caused to coincide in logiclevel with the data in the SDC. Therefore, there is no need to providethe transistors 62 e, 62 f between the data input terminal 5 a and theSDC as in the prior art. Consequently, the first embodiment has theadvantage of simplifying the circuit configuration.

In the first embodiment, when the data on the second page (upper page)is written into the memory cell, a program and verify (a*, a′) operationand a program verify (b′, c′) operation are carried out separately.However, as in a program verify (b′, c′) operation, they may be verifiedsimultaneously by raising the word line potential in the order of a*,a′, b′, c′ sequentially after the bit line is charged once.

In addition, in the second page read operation, a read (b, c) operationand a read (a) operation are carried out separately. However, these dataitems may be read simultaneously by raising the word line potential inthe order of a, b, c sequentially after the bit line is charged once.

Second Embodiment

FIG. 19 shows a memory cell array 1 and a bit line control circuit 2 ina NAND flash memory for storing 8-valued (3 bits of) data according to asecond embodiment of the present invention. Since the configuration ofFIG. 19 is almost the same as the configuration for 4-valued (2 bits of)data shown in FIG. 3, only the part differing from the configuration ofFIG. 3 will be explained.

In FIG. 19, when one word line is selected by an external address, thenone sector shown by a broken line is selected. One sector is composed ofthree pages. An address is used to switch between the three pages.Specifically, since 3 bits of data can be stored in a memory cell, theswitching between three bits is done by an address (a first page, asecond page, and a third page). One sector has five flag cells FC1, FC2,FC3, FC4, and FC5 (FIG. 19 shows only flag cells FC1 and FC5).Therefore, when one word line is selected, the five flag cells FC1, FC2,FC3, FC4, and FC5 are selected at the same time. The flag cells FC1 toFC5 are connected via bit lines to flag data storage circuits 10 a, 10b, 10 c, 10 d, 10 e, respectively (FIG. 19 shows only the flag datastorage circuits 10 a, 10 e). The flag cells FC1, FC2 store dataindicating that the second page has been written into. The flag cellsFC3, FC4, FC5 store data indicating that the third page has been writteninto.

However, since one memory cell can store 3 bits of data, three flagcells may be used to store data indicating that the second page andthird page have been written into, without using five flag cells.

Moreover, to increase the reliability, more than one of each of the flagcells FC1 to FC5 may be provided. The same data is stored in thesecells. In a read operation, majority decision may be applied to the dataread from the flag cells.

The operation of the second embodiment will be explained.

An erase operation is the same as in the case of 4-valued data.

FIGS. 20A, 20B, 20C and FIGS. 21A, 21B show the relationship between thedata in a memory cell and the threshold voltage of the memory cell.After an erase operation is carried out, the data in the memory cellbecomes “0”. As shown in FIG. 20A, when the first page is written into,the data in the memory cell becomes data “0” and data “4”. Thereafter,when data is written into a cell adjoining the first page, the thresholdvoltage of data “4” expands (FIG. 20B).

After the second page is written into, the data in the memory cellbecomes data “0”, “2”, “4”, “6” (FIG. 20C). Thereafter, when data iswritten into the adjoining cell, the threshold value distribution ofeach of data “0”, “2”, “4”, “6” expands (FIG. 21A).

After the third page is written into, the data in the memory cellbecomes data “0” to “7” (FIG. 21B). In the second embodiment, the datain the memory cell is defined, starting from the lowest thresholdvoltage upward.

FIGS. 22A and 22B show two write sequences in the second embodiment. Ina block, data is written in pages, starting from a memory cell closer tothe source line. In FIGS. 22A and 22B, for the sake of explanation, thenumber of word lines is set at 4. The write sequence shown in FIG. 22Ais similar to the write sequence shown in FIG. 7. In contrast, the writesequence shown in FIG. 22B differs a little from that of FIG. 22A.Specifically, after the first page is written into, the same cell iswritten into up to the second page, instead of writing data into thesecond page of the adjoining cell. Thereafter, before the third page iswritten into, up to the second page of the adjoining cell is writteninto and then the third page is written into. As described above,writing may be done, taking into account the effect of a cell adjoiningthe third page.

Let the original read potentials for the third page word line be “a”,“b”, “c”, “d”, “e”, “f”, “g” and the verify potentials be “a′”, “b′”,“c′”, “d′”, “e′”, “f”, “g′”. Let the second page read potentials be “b*”(=“a”), “d*”, “f*” lower than the original read potentials and thesecond page verify potentials be “b*′”, “d*′”, “f*′” a little higherthan these. Let the first page read potential be “d**” (=“a”) lower thanthe original read potential and the first page verify potential be“d**′” a little higher than this.

(Program and Program Verify)

In a program operation, first, an address is specified, therebyselecting three pages shown in FIG. 19. In the memory, of the threepages, programming can be done only in this order: the first page, thesecond page, and then the third page. First page and second page areprogrammed in the same manner as in the case of 4-valued data.

The data in a 4-valued memory cell and the threshold voltages of thememory cell shown in FIGS. 20A, 20B, and 20C correspond to those inFIGS. 1A, 1B, and 1C. Since flowcharts for a program and a programverify operation are the same as those in FIGS. 8 and 9, they will beomitted. The definitions of data in the memory cell and the word linepotentials are “0”, “1”, “2”, “3” and “a”, “b”, “c” in the case of4-valued data, whereas they are “0”, “2”, “4”, “6” and “b”, “d”, “f” inthe case of 8-valued data.

(First Page Program)

A flowchart for the first page program is the same as that of FIG. 8,except that the definitions of the word line potentials are changed asdescribed above.

(Adjoining Cell Program)

As shown in FIG. 22A, after one bit of data is written into the firstpage of the memory cell 1, the first page of the memory cell 2 adjoiningthe memory cell 1 in the word direction is written into. Then, thewriting of data into the first page of the memory cell 3 adjoining thememory cell 1 in the bit direction and the writing of data into thefirst page of the memory cell 4 adjoining the memory cell 1 diagonallyare effected in that order. When these write operations have beencarried out, the threshold voltage of the memory cell 1 rises due to theFG-FG capacitance, depending on writing data. Accordingly, the thresholdvoltage distribution of data “0” and that of data “4” in the memory cell1 expand toward a higher threshold voltage as shown in FIG. 20B.

Thereafter, one bit of data is written into the second page of thememory cell 1 again.

(Second Page Program)

A flowchart for the second page program is the same as that of FIG. 9,except that the definitions of the word line potentials are changed asdescribed above. The data in the data cache after a data load operationand an internal read operation are the same as the data in the datacache after data cache setting. In the second page write operation, theflag cell FC1 is written into to the verify potential “b*′” and the flagcell FC2 is written into to the verify potential “d*′”.

(Adjoining Cell Program)

As shown in FIG. 22A, after data is written into the first and secondpages of the memory cell 1, data is written into the second page of thememory cell 2, the first page of the memory cell 5, the first page ofthe memory cell 6, and the second page of the memory cell 3, and thesecond page of the memory cell 4. When these write operations have beencarried out, the threshold voltage of the memory cell 1 rises due to theFG-FG capacitance, depending on writing data. Accordingly, the thresholdvoltage distributions of data “2”, data “4”, and data “6” in the memorycell 1 expand as shown in FIG. 21A.

Thereafter, one bit of data is written into the third page of the memorycell 1 again.

(Third Page Program)

FIG. 23 is a flowchart for a third page program operation. In the thirdpage program operation, too, an address is selected first, therebyselecting three pages shown in FIG. 19.

Next, the data storage circuits 10 are reset (S91). Writing data isexternally inputted and then is stored in the SDCs in all of the datastorage circuits 10 (S92). If data “1” is externally inputted (if nowriting is done), the SDC of the data storage circuit 10 of FIG. 6 goeslow. If data “0” is externally inputted (if writing is done), the SDCgoes high. Thereafter, when a write command is inputted, this means thethird page program. Thus, to write data into the flag cells FC3 to FC5,specific data is inputted to the flag cell data storage circuits 10 a,10 b.

As shown in FIG. 21B, in the third page program, when the data in thememory cell is “0” and the externally inputted data is “1”, the data inthe memory cell is kept at “0”. When the externally inputted data is“0”, the data in the memory cell is set at “1”.

When the data in the memory cell is “2” and the externally inputted datais “0”, the data in the memory cell is kept at “2”. However, in thesecond page write operation, when it is verified whether the data in thememory cell has reached “2”, the verify potential “b*′” lower than theoriginal one is used. For this reason, a memory cell storing data “2” iswritten into to the potential “b′” or the original verify potential.When the data in the memory cell is “2” and when the externally inputteddata is “1”, the data in the memory cell is set at “3”.

When the data in the memory cell is “4” and the externally inputted datais “I”, the data in the memory cell is kept at “4”. However, in thesecond page write operation, when it is verified whether the data in thememory cell has reached “4”, the verify potential “d*′” lower than theoriginal one is used. For this reason, a memory cell storing data “4” iswritten into to the potential “d′” or the original verify potential.When the data in the memory cell is “4” and when the externally inputteddata is “0”, the data in the memory cell is set at “5”.

When the data in the memory cell is “6” and the externally inputted datais “0”, the data in the memory cell is kept at “6”. However, in thesecond page write operation, when it is verified whether the data in thememory cell has reached “6”, the verify potential “f*′” lower than theoriginal one is used. For this reason, a memory cell storing data “6” iswritten into to the potential “f” or the original verify potential. Whenthe data in the memory cell is “6”and when the externally inputted datais “1”, the data in the memory cell is set at “7”.

In the second page write operation, the flag cell FC1 is written into tothe verify potential “b*′” and the flag cell FC2 is written into to theverify potential “d*′”. In the third page write operation, the flag cellFC3 is written into to the verify potential “a′”, the flag cell FC4 iswritten into to the verify potential “b′”, and the flag cell FC5 iswritten into to the verify potential “d′”.

(Third-Page First-Session Program)

In the third page program, data “1” to “7” are written into the memorycell. Although these data can be programmed simultaneously, four data“4” to “7” are written into the memory cell. Thereafter, data “1” to “3”are written into the memory cell. This will be explained concretelybelow.

(Internal Data Read 1 and Data Cache Setting 1) (S93, S94)

Before data is written into the memory cell, it is determined whetherthe data in the second page memory cell is either “4” or “6” or either“0” or “2”, whether the data in the memory cell is “6”, and whether thedata in the memory cell is any one of “0”, “2”, and “4”. To do this, theword line potential is set to “d*” and “f*” in that order and aninternal read operation is carried out (S93).

FIG. 25A shows the state of the data cache after an internal readoperation. Thereafter, the data cache is operated to set the data cacheas shown in FIG. 25B. Then, for example, the counter (PC) is initializedto zero and the data in the fifth flag cell is loaded (S94).

In FIG. 25B, to set the data in the memory cell at “0” to “3”, the PDCis set high. To set the data in the memory cell at “4”, the PDC is setlow, the DDC is set low, and the SDC is set high. To set the data in thememory cell at “5”, the PDC is set low, the DDC is set high, and the SDCis set high. To set the data in the memory cell at “6”, the PDC is setlow, the DDC is set high, and the SDC is set low. To set the data in thememory cell at “7”, each of the PDC, DDC, and SDC is set low.

(Program: First Session) (S95)

After the counter (PC) is counted up, data is written into the memorycell. As in the first embodiment, in the second embodiment, unnecessaryverify operations are skipped using the value of the counter and apredetermined number of verify starts.

First, when the signal BLC1 is set at Vsg, if the PDC has data “0”, thebit line is at Vss. If the PDC has data “1”, the bit line is at Vdd.Next, after the signal BLC1 is set at Vss, the signal VREG is set at Vddand the signal REG is set at the intermediate potential+Vth(1 V+Vth).Then, if the DDC has data “1”, the bit line is at the intermediatepotential. If the DDC has data “0”, the bit line is not precharged. As aresult, only when data “4”, “7” are written into the memory cell, thebit line is at Vss. When data “5”, “6” are written in the memory cell,the bit line is at the intermediate potential (1 V). If the data in thememory cell is “0” to “3” (if no writing is done), the bit line is atVdd. Here, the selected word line is set at Vpgm and the unselected wordline is set at Vpass. If the bit line is at Vdd, no writing is done. Ifthe bit line is at Vss, writing is done. If the bit line is at theintermediate potential (I V), writing is done a little. Accordingly, amemory cell in which data “5”, “6” have been written might be writteninto insufficiently. However, since data “6” and data “7” are verifiedsimultaneously, the write time ends earlier when they are written assimultaneously as possible. Therefore, the intermediate potential issupplied to the bit line.

(a) Thereafter, the verify voltage “d′” is set and a write verifyoperation is carried out (S96, S97). In this verify operation, when thesignal BLC2 is made high and signal BLCLAMP is set to a specificpotential, the bit line is precharged. At this time, what is prechargedis only a memory cell whose SDC is at the high level, that is, a memorycell in which data “5”, “4” have been written.

Next, the verify potential “d′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thesignal VREG is set at Vss and the signal REG is set at VDD. If the DDCis at the high level, the bit line is discharged. Therefore, a memorycell whose bit line is precharge is only the one into which data “4” isto be written.

Next, while the bit line is being discharged, the data in the DDC istransferred to the TDC. Thereafter, the data in the PDC is transferredto the DDC and the data in the TDC is transferred to the PDC. Then, theTDC is charged to Vdd. Thereafter, the signal BLCLAMP is set to aspecific potential. Then, it is when data “4” has been written in thememory cell and the verify potential “d′” has been reached that the TDCgoes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “4” has been written in the memorycell and the verify potential “d′” has been reached, or when writing isunselected that the TDC goes to Vdd. Then, the signal DTG is set to Vsgand the data in the PDC is copied into the DDC. Thereafter, the signalBLC1 is set to Vsg and the potential of the TDC is loaded into the PDC.

(b) Thereafter, the verify voltage “e′” is set and a write verifyoperation is carried out (S98, S99, S100).

In this verify operation, the signal VPRE is set high and the signalBLCLAMP is set to a specific potential, thereby precharging the bitline. Next, the verify potential “e′” is supplied to the word line andthe bit line is discharged. While the bit line is being discharged, thedata in the DDC is transferred to the TDC. Thereafter, the data in thePDC is transferred to the DDC and the data in the TDC is transferred tothe PDC. Then, the TDC is charged to Vdd. Thereafter, the signal BLCLAMPis set to a specific potential. Then, it is when the threshold voltageof the cell is equal to or higher than the verify potential “e′” thatthe TDC goes high. Here, when the signal BALC2 is set at Vth+0.5 V, ifthe SDC has “0” (when data “6” has bee written in the memory cell orwhen data “7” has been written in the memory cell), the TDC goes to Vss.Thus, it is when data “5” has been written in the memory cell and theverify potential “e′” has been reached.

Next, when the signal VREG is made high and signal REG is set to Vsg, ifthe data in the DDC is at the high level, the TDC is forced to go high.Therefore, it is when data “5” has been written in the memory cell andthe verify potential “e′” has been reached or when writing is unselectedthat the TDC goes to Vdd. After the signal DTG is set to Vsg and thedata in the PDC is copied into the DDC, the signal BLC1 is set to Vsgand the potential of the TDC is loaded into the PDC.

(c) A verify operation using the verify potential “f′” is the same as averify operation using the verify potential “b” of the first embodiment.The word line potential in a verify operation is “f” (S101, S102, S103).

(d) A simultaneous verify operation with the verify potentials “f′”,“g′” is the same as a simultaneous verify operation with the verifypotentials “b”, “c” of the first embodiment. The word line potentials ina verify operation are “f′” and “g′”.

In this way, the program and verify operation is repeated until the datain all of the PDCs has become “1” (S106, S107). However, when the datain the DDC is “1” in a write operation, that is, when data “5” has beenwritten in the memory cell or when data “6” has been written in thememory cell, the bit line is set to the intermediate potential and awrite operation is carried out. Each time the program and verifyoperation is repeated, the program voltage Vpgm is raised little bylittle. In the first program, four data “4” to “7” are written into thememory cell.

In the above explanation, after the first program, four verifyoperations are carried out. In the initial loop of the program, thethreshold voltage does not rise. Thus, only a verify operation using theverify potential “d′” is carried out at first. Next, a verify operationusing the verify potential “d′” and the verify potential “e′” is carriedout. Then, a verify operation using only the verify potential “d′”, theverify potential “e′”, and the verify potential “f′” is carried out.Finally, a verify operation using the verify potential “d′” and theverify potential “e′” and a “f, g′” simultaneous verify operation ofverifying the verify potential “f′” and the verify potential “g′” at thesame time may be carried out.

In a loop close to the end of the program, the writing of data “4” hasbeen completed. Therefore, a verify operation using the verify potential“d′” may be omitted and a verify operation using the verify potential“d′” and the verify potential “e′” may be omitted.

In the first third-page program, the flag cell FC5 is written into tothe verify potential “d′”.

(Second-Session Program) (S108 to S121)

In a second-session program, three data “1” to “3” are written into thememory cell. A memory cell into which data “1” is to be written has notbeen written into at all. Therefore, as in the first embodiment, averify potential “a*′” lower than the original verify potential isprovided. The intermediate potential is supplied to the bit line of acell whose threshold voltage has exceeded the verify potential “a*′”.This makes the write speed slower and the threshold value distributionnarrower. Since data “2” and data “3” are verified simultaneously, thewrite time ends earlier when they are written as simultaneously aspossible. Therefore, even when data “2” is being written into the memorycell, the intermediate potential is supplied to the bit line, therebymaking the write speed slower.

(Internal Data Read 2 and Data Cache Setting 2) (S109, S110)

After the data in the third flag cell has been loaded (S108), beforedata is written into the memory cell, the word line potential is set to“b*(=a)” and “d*” in that order and an internal read operation iscarried out (S109).

Thereafter, the data cache is operated to set the data cache as shown inFIG. 26 (S110). Specifically, to write data “0” into the memory cell,the PDC is set high, the DDC is set high, and the SDC is set high. Towrite data “1” into the memory cell, the PDC is set low, the DDC is setlow, and the SDC is set high. To write data “2” into the memory cell,the PDC is set low, the DDC is set high, and the SDC is set low. Towrite data “3” into the memory cell, the PDC is set low, the DDC is setlow, and the SDC is set low. To write data “4” to “7” into the memorycell, each PDC is set high.

Here, for example, the counter (PC) is initialized to zero and the datain the fourth flag cell is loaded.

(Program: Second Session) (S111)

Next, for example, after the counter (PC) is counted up, data is writteninto the memory cell. When the signal BLC1 is set at Vsg first, if thePDC has data “0”, the bit line is at Vss. If the PDC has data “1”, thebit line is at Vdd. Next, after the signal BLC1 is set at Vss, thesignal VREG is set at Vdd and the signal REG is set at the intermediatepotential+Vth (1 V+Vth). Then, if the DDC has data “1”, the bit line isat the intermediate potential (I V). If the DDC has data “0”, the bitline is not precharged. As a result, when data “3” has been written inthe memory cell or when data “1” has been written in the memory cell andthe threshold voltage is equal to or lower than the verify potential“a*′” lower than the original verify potential, the bit line is at Vss.When data “2” has been written in the memory cell, when data “1” hasbeen written in the memory cell and the threshold voltage has exceededthe verify potential “a*′” lower than the original potential, or whenthe bit line is at the intermediate potential (1 V) and the data in thememory cell is “0”, “4” to “3” (when no writing is done), the bit lineis at Vdd. Here, the selected word line is set at Vpgm and theunselected word line is set at Vpass. If the bit line is at Vdd, nowriting is done. If the bit line is at Vss, writing is done. If the bitline is at the intermediate potential (1 V), writing is done a little.Since verify operations in writing data “2” and data “3” into the memorycell are carried out simultaneously, the write time ends earlier whenthey are written as simultaneously as possible. Therefore, theintermediate potential is supplied to the bit line.

(e) A verify operation using the verify potentials “a′, a*′” is the sameas a verify operation using the verify potentials “a′, a*′” in the firstembodiment (S112, S113, S114).

(f) A verify operation using only the verify potential “b′” is the sameas a verify operation using only the verify potential “b′” in the firstembodiment (S115, S116, S117).

(g) A simultaneous verify operation using the verify potentials “b′”,“c′” is the same as a simultaneous verify operation using the verifypotentials “b”, “c” (S118, S119).

When the PDC is at the low level, the write operation is carried outagain. The program and verify operation is repeated until the data inthe PDCs of all of the data storage circuits has become high (S120 toS121).

In the above explanation, after the first-session program, three verifyoperations are carried out. In the initial loop of the program, thethreshold voltage does not rise. Thus, only a verify operation using theverify potentials “a′, a*′” is carried out at first. Next, a verifyoperation using the verify potentials “a′, a*′” is carried out. Then, averify operation using the verify potential “b′” is carried out.Finally, a verify operation using the verify potentials “a′, a*′” and asimultaneous verify operation using the verify potentials “b′”, “c′” maybe carried out.

In a loop close to the end of the program, since the writing of data “1”has been completed, these verify operations may be omitted. If data “1”need not be verified, the SDC does not have to hold the data. Therefore,data for next writing may be read from the outside and stored in theSDC. With such a configuration, a still higher speed operation ispossible.

In the third-page second program, the flag cell FC3 is written into tothe verify potential “a′” and the flag cell FC4 is written into to theverify potential “b′”.

(First Page Read)

FIG. 27A is a flowchart for a first page read operation.

First, an address is specified, thereby selecting three pages shown inFIG. 19. As shown in FIGS. 20A, 20B, and 20C and FIGS. 21A and 21B, thedistribution of threshold voltage differs before and after the secondpage is written into and before and after the third page is writteninto. Therefore, the potential of the word line is set to “d” first anda read operation is carried out (S131). Thereafter, it is determinedfrom the data in the flag cell FC5 whether the third page has beenwritten into (S132). In the determination, if there are a plurality offlag cells, it is decided by the majority of the flag cells.

If the data read from the flag cell FC5 is “0”, this means that thethird page has been written into. Since the threshold value distributionis as shown in FIG. 21B, the result of reading the potentials on theword lines with “d” has already been read into the data storage circuits10. Thus, these data are outputted to the outside world (S133).

On the other hand, when the data read from the flag cell FC5 is “1”,this means that the third page has not been written into. Therefore, theword line potential is set to “d*” and a read operation is carried out(S134). It is determined from the data in the flag cell FC2 whether thesecond page has been written into (S135). In the determination, if thereare a plurality of flag cells, it is decided by the majority of the flagcells.

If the data read from the flag cell FC2 is “0”, this means that thesecond page has been written into. Since the threshold valuedistribution is as shown in FIG. 20C, the result of reading thepotentials on the word lines with “d*” has already been read into thedata storage circuits 10. Thus, these data are outputted to the outsideworld (S133).

On the other hand, when the data read from the flag cell FC2 is “1”,this means that the second page has not been written into. Therefore,the word line potential is set to “a” and a read operation is carriedout and the read-out result is outputted to the outside world (S136).

(Second Page Read)

FIG. 27B is a flowchart for a second page read operation.

First, an address is specified, thereby selecting three pages shown inFIG. 19. As shown in FIGS. 20A to 20C and FIGS. 21A and 21B, thedistribution of threshold voltage differs before and after the secondpage is written into and before and after the third page is writteninto. Therefore, the potential of the word line is set to “b” first anda read operation is carried out (S141). Thereafter, it is determinedfrom the data in the flag cell FC4 whether the third page has beenwritten into (S142). In the determination, if there are a plurality offlag cells, it is decided by the majority of the flag cells.

If the data read from the flag cell FC4 is “0”, this means that thethird page has been written into. Since the threshold value distributionis as shown in FIG. 21B, it is necessary to read the data from thememory cell with the word line potentials “b”, “d”, “f”. However, theresult of reading the word line potential “b” has already been read intothe data storage circuit. Thus, the data is read with the word linepotentials “d”, “f” and then is outputted (S143, S144). The reading withthe word line potentials “d”, “f′” is the same as a “b, c′” simultaneousread operation in the first embodiment.

On the other hand, when the data read from the flag cell FC4 is “I”,this means that the third page has not been written into. Therefore, theword line potential is set to “a” and a read operation is carried out(S145). It is determined from the data read from the flag cell FC1whether the second page has been written into (S146). In thedetermination, if there are a plurality of flag cells, it is decided bythe majority of the flag cells.

If the data read from the flag cell FC1 is “0”, this means that thesecond page has been written into. Since the threshold valuedistribution is as shown in FIG. 20C, it is necessary to read data withthe word line potentials “b*′, “d*”, “f*”. However, the result ofreading the word line potential “b*” has already been read into the datastorage circuit 10. Thus, the data is read with the word line potentials“d*′, “f*” and is outputted (S144). A read operation with the word linepotentials “d*”, “f*” is the same as a “b, c” simultaneous readoperation in the first embodiment.

On the other hand, when the data read from the flag cell FC1 is “1”,this means that the second page has not been written into. Therefore,data is fixed to “1” and is outputted to the outside world (S148).

(Third Page Read)

FIG. 28 is a flowchart for a second page read operation.

First, an address is specified, thereby selecting three pages shown inFIG. 19. As shown in FIGS. 20A, 20B, and 20C and FIGS. 21A and 21B, thedistribution of threshold voltage differs before and after the secondpage is written into and before and after the third page is writteninto. Therefore, a read operation is carried out with the word linepotentials “e, g” (S151). Then, a read operation is carried out with theword line potentials “a, c” (S152). Thereafter, it is determined fromthe data read from the flag cell FC3 whether the third page has beenwritten into (S153). In the determination, if there are a plurality offlag cells, it is decided by the majority of the flag cells. A readoperation with the word line potentials “e, g” and a read operation withthe word line potentials “a, c” are the same as in the first embodiment.

If the data read from the flag cell FC3 is “0”, this means that thethird page has been written into. The threshold value distribution is asshown in FIG. 21B. Thus, the data read into the data storage circuitwith the word line potentials “e, g” and the word line potentials “a, c”is outputted (S154). If the data read from the flag cell FC3 is “1”,this means that the third page has not been written into. Therefore,data is fixed to “1” and is outputted to the outside world (S155).

(Erase)

Since an erase operation is carried out in the same manner as in thefirst embodiment, its explanation will be omitted.

With the second embodiment, 8-valued (3 bits of) data can be written andread reliably at high speed. Moreover, in a third page write operation,with the bit line being precharged, a plurality of threshold voltagesare verified simultaneously by changing the potentials of the word line.This enables a third page program verify operation to be made faster.

In the 8-valued (3-bit) NAND flash memory of the second embodiment, whenthe third page is written into, data “4” to “7” are written in the firstwrite operation and data “1” to “3” are written. However, this inventionis not limited to this. For instance, data “2”, “4”, “6” may be writtenfirst and then data “I”, “3”, “5”, “7” may be written.

Even when the data items are written in such a manner, the same effectas in the first embodiment can be produced.

Third Embodiment

In the second embodiment, the flag cells FC1 to FC5 have written into asfollows. When the second page is written into, the flag cell FC1 iswritten into to the verify potential “b*′” and the flag cell FC2 iswritten into to the verify potential “d*′”. When the third page iswritten into, the flag cell FC3 is written into to the verify potential“a′”, the flag cell FC4 is written into to the verify potential “b′”,and the flag cell FC5 is written into to the verify potential “d′”. Forthis reason, the second embodiment uses five flag cells. However, theflag cell FC1 can be substituted for the flag cell FC4 and the flag cellFC2 can be substituted for the flag cell FC5. Therefore, the circuitshown in FIG. 19 can be composed of three flag data storage circuits andthree flag cells FC1, FC2, and FC3.

In the above configuration, the first and second page write operationsare the same as in the second embodiment. The third page write operationdiffers a little from that in the second embodiment.

FIGS. 29 and 30 show the third page write operation. In a third-pagefirst write operation of FIG. 29, what differs from FIG. 23 is the wayof loading the flag cell data after the internal read (S93). In thesecond embodiment, data is loaded into the fifth flag cell FC5 (S94). Incontrast, in the third embodiment, after the internal read operation(S93), data is loaded into the flag cell FC2 (S151).

In a third-page second write operation of FIG. 29, what differs fromFIG. 24 is the way of loading the flag cell data after the internal readoperation (S109). In the second embodiment, data is loaded into thefourth flag cell FC4 (S110). In contrast, in the third embodiment, afterthe internal read operation (S93), data is loaded into the flag cell FC1(S161).

As described above, when the second page is written into, the flag cellFC1 is written into to the verify potential “b*′” and the flag cell FC2is written into to the verify potential “d*′”. Next, in the writeoperations shown in FIGS. 29 and 30, when the third page is writteninto, the flag cell FC3 is written into to the verify potential “a′”.The flag cell FC1 written into to the verify potential “b*′” in thesecond page write operation is written into to the verify potential “b′”in the third page write operation. The flag cell FC2 written into to theverify potential “d*′” in the second page write operation is writteninto to the verify potential “d′” in the third page write operation.

FIG. 31A shows a first page reading algorithm and FIG. 31B shows asecond page reading algorithm.

In FIG. 31A, what differs from FIG. 27A is the determination after aread operation is carried out with the potential “d” (S131). In thesecond embodiment, this determination is made on the basis of the dataread from the flag cell FC5 (S132). In contrast, in the thirdembodiment, the determination is made on the basis of the data read fromthe flag cell FC2 (S201). The remaining operation is the same as in FIG.27A.

In FIG. 31B, what differs from FIG. 27B is the determination after aread operation is carried out with the potential “b” (S141). In thesecond embodiment, this determination is made on the basis of the dataread from the flag cell FC4 (S142). In contrast, in the thirdembodiment, the determination is made on the basis of the data read fromthe flag cell FC2 (S211). The remaining operation is the same as in FIG.27B.

A third page reading algorithm is the same as that of the secondembodiment shown in FIG. 28.

With the third embodiment, use of three flag data storage circuits andthree flag cells enables a program verify operation to be made faster asin the second embodiment. Since the number of flag data storage circuitsand flag cells can be reduced, the third embodiment has the advantage ofdecreasing the area occupied by the chip.

In the second page write operation in the first embodiment, and in thethird page write operation in the second and third embodiments, whendata “1” is written into the memory cell, the SDC becomes empty.Therefore, it is possible to supply the data to be written next to theSDC. Storing the data to be written next in the SDC beforehand makes thewrite speed much faster.

Furthermore, the following configuration is possible: when the SDCbecomes empty, the program operation is stopped temporarily, the data isread from the memory cell on another page, the result of the reading isstored in the SDC, and the stopped program operation is started again,while the SDC is outputting the stored data to the outside world.

The number of flag cells and their arrangement are not limited to thefirst to third embodiments.

FIG. 32 shows an example of arranging a plurality of flag cells. In theexample, to increase reliability, a plurality of first and second flagcells and dummy cells are provided at one end of the memory cell array.Specifically, four first flag cells and three second flag cells arearranged for even-numbered pages (BLE) and four first flag cells andthree second flag cells are arranged for odd-numbered pages (BLO). Onboth sides of the even-numbered and odd-numbered second flag cells, aneven-numbered dummy cell and an odd-numbered dummy cell are provided.

With this configuration, in a read operation, by the majority decisionof the four first flag cells for even-numbered pages and by the majoritydecision of the three second cells for even-numbered pages, it isdetermined whether the second page of an even-numbered page has beenwritten into. In addition, by the majority decision of the four firstflag cells for odd-numbered pages and by the majority decision of thethree second cells for odd-numbered pages, it is determined whether thesecond page of an odd-numbered page has been written into. With thisconfiguration, even when the threshold voltage of a cell previouslywritten into is changed by the threshold voltage of an adjoining cellwritten into later through the FC-FC capacitance of the adjoining cell,it can be determined reliably that the second page has been writteninto.

Fourth Embodiment

In a nonvolatile semiconductor memory device for storing multivalueddata, when the number of bits of data to be stored is large, onethreshold value distribution has to be made narrower. To achieve this,the following has been proposed: in a program and verify operation, awrite operation is carried out, while the program voltage is increasedlittle by little. When the program voltage has exceeded a verifypotential lower than the original verify potential, an intermediatepotential is inputted to the bit line, thereby making the write speed inthe program operation slower. In this state, writing is done to theoriginal verify potential. However, it is necessary to distinguish astate where a verify potential lower than the original one has beenexceeded from a state where the original verify potential has beenexceeded. This causes the problem of increasing the number of pagebuffers.

The operation of the fourth embodiment is almost the same as that of thefirst embodiment, except for a simultaneous verify operation of data “2”and “3” using the verify potentials “b′” and “c′” in a second pageprogram verify operation. In the first embodiment, a cell to be writteninto to the threshold voltages “b′” and “c′” is written into to a verifypotential lower than the original threshold voltage. When the cell hasexceeded this verify potential, the intermediate potential is suppliedto its bit line, making the write speed slower, which prevents the widthof the distribution of the threshold voltage from getting narrower. Asshown in FIG. 33A, a cell to be written into to the threshold voltage“b′” is written into to the level of “v′” in a first page writeoperation. Thus, the write speed becomes slower. For this reason, suchan operation may be unnecessary. A cell to be written into to thethreshold voltage “c′” is also written into to the level of “v′” in afirst page write operation. There is a difference in level between “v′”and “c′”. For this reason, in verifying the threshold voltage “c′”, acell is written into to a verify potential lower than the originalthreshold voltage. When the cell has exceeded the level, theintermediate potential is supplied to its bit line, making the writespeed slower, which narrows the threshold value distribution. To dothis, the threshold voltage “c′” is verified with a verify potential“c*′” lower than the original one and with the original verify potential“c′”.

FIG. 34 shows a first page write operation according to the fourthembodiment. Since a first write operation shown in S301 to S308 of FIG.34 and the data in the data cache of FIG. 36 are the same as those inthe first embodiment, explanation of them will be omitted.

FIG. 35 shows a second page write operation. In a second page writeoperation, the operations from S311 to S322 are almost the same as thosein the first embodiment, expect for a simultaneous verify operationusing the verify potentials “b”, “c*′”, and “c′”.

(Simultaneous Verification Using the Verify Potentials “b”, “c*′”, “c′”)(FIGS. 37 and 38)

In FIG. 35, when a program and verify operation is repeated a pluralityof times, the writing of data into a cell where data “3” is beingwritten into the memory cell is completed. Therefore, instead of theverify operation using the verify potential “b′” (S322), a simultaneousverify operation is carried out using the verify potentials “b′”, “c*′”,and “c” (S324). First, the signal BLPRE is set to the high level(Vdd+Vth), the VPRE is set to the high level (Vdd+Vth), and the signalBLCLAMP is set to a specific potential, thereby precharging the bitline.

Next, the verify potential “b′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC. Thereafter, the data in thePDC is transferred to the DDC and the data in the TDC is transferred tothe PDC.

Then, after the TDC is charged to Vdd, the signal BLCLAMP is set to thespecific potential. Then, it is when the threshold voltage is equal toor higher than the verify potential “b′” that the TDC goes high (“1”).Here, when the signal BLC1 is at an intermediate potential, such asVth+0.5 V, if the PDC has “0” (is at the low level) (when data “3” hasbeen written in the memory cell or when data “1” has been written in thememory cell and the threshold voltage is equal to or lower than theverify potential “a*′”), the TDC goes to Vss. Therefore, it is when data“2” has been written in the memory cell and the verify potential “b′”has been reached that the TDC goes to Vdd. Next, when the signal VREG isset high (e.g., to Vdd) and the signal REG is set to Vsg (e.g.,Vdd+Vth), if the data in the DDC is at the high level, the TDC is forcedto go high. Therefore, it is when data “2” has been written in thememory cell and the verify potential “b′” has been reached or whenwriting is unselected that the TDC goes to Vdd. After the signal DTG isset to Vsg and the data in the PDC is copied into the DDC, the signalBLC1 is set to Vsg and the potential of the TDC is loaded into the PDC.

Next, the verify potential “c*′” is supplied to the word line and thebit line is discharged.

Then, after the TDC is charged to Vdd, the signal BLCLAMP is set to aspecific potential. It is when data “3” has been written in the memorycell and the verify potential “c*′” has been reached that the TDC goesto Vdd. Next, when the signal VREG is made high and the signal REG isset to Vsg, if the data in the DDC is at the high level, the TDC isforced to go high. Therefore, it is when data “3” has been written inthe memory cell and the verify potential “c*′” has been reached, whendata “2” has been written in the memory cell, or when data “1” has beenwritten in the memory cell and the threshold voltage is equal to orhigher than the verify potential “a*′” that the TDC goes to Vdd. Afterthe signal DTG is set to Vsg and the data in the PDC is copied into theDDC, the signal BLC1 is set to Vdd+Vth and the potential of the TDC isloaded into the PDC.

Next, the verify potential “c′” is supplied to the word line and the bitline is discharged.

Then, after the TDC is charged to Vdd, the signal BLCLAMP is set to aspecific potential. It is when data “3” has been written in the memorycell and the verify potential “c′” has been reached that the TDC goes toVdd. Next, when the signal VREG is made high and the signal REG is setto Vsg, if the data in the DDC is at the high level, the TDC is forcedto go high. Therefore, it is when data “3” has been written in thememory cell and the verify potential “c′” has been reached or whenwriting is unselected that the TDC goes to Vdd. After the signal DTG isset to Vsg and the data in the PDC is copied into the DDC, the signalBLC1 is set to Vsg and the potential of the TDC is loaded into the PDC.

As a result of these operations, when data “3” has been written in thememory cell, the verify potential “c*′” has been exceeded, and the writeoperation has not been completed with the original verify potential, theDDC is at the high level, the PDC is at the low level, and the SDC is atthe low level. This state is the same as when data “2” has been writtenin the memory cell. For this reason, in the next program, since the DDCis at the high level, the bit line is at the intermediate potential(e.g., 1 V), with the result that writing is done.

Thereafter, in a simultaneous verify operation with the verifypotentials “b′”, “c*′”, “c′”, since the threshold voltage is equal to orhigher than “c*′” in verifying the threshold voltage “b′”, this verifyoperation is skipped and the PDC goes high. Thus, when data “3” has beenwritten in the memory cell and the verify potential “c*′” has beenexceeded, the bit line is set to the intermediate potential only onceand writing is done.

In this way, the program and verify operation is repeated until the datain all of the PDCs has become “1”. However, when the data in the DDC is“1” in a write operation, that is, when data “2” has been written in thememory cell, when data “3” has been written in the memory cell and theverify potential “c*′” has been exceeded (this is the same as when data“2” has been written in the memory cell), or when data “1” has beenwritten in the memory cell and the verify potential “a*′” has beenexceeded, the bit line is set to the intermediate potential and a writeoperation is carried out.

Each time the program and verify operation is repeated, the programvoltage Vpgm is raised little by little. An increment ΔVpgm in theprogram voltage Vpgm differs between the first page write operation andthe second page write operation. For example, an increment ΔVpgm in thefirst page write operation is set larger than an increment ΔVpgm in thesecond page write operation.

In the flowchart of FIG. 35, after program and verify “a*, a′” (S316,S319) is repeated several times, program and verify “a*′, a′” andprogram verify “b′” are repeated several times, and program and verify“a*′, a′” and program verify “b′, c′” are repeated several times. In themiddle of repeating the operations, the writing of data “1” into thememory cell is completed earlier. Therefore, when the cells into whichdata “1” is to be written have run out, program verify “a*′, a′” isskipped (S318 to S320) and program and program verify “b′” (S316, S322)or program and program verify “b′, c*′, c′” (S316 to S326) is repeated.When program and verify “a*′, a′” (S316, S319) is skipped, the SDC isnot used. Therefore, the next program data can be inputted. However,there may be a cell where data “1” is difficult to write into the memorycell. Therefore, the number of times of program verify “a*, a′” islimited.

(Read Operation)

A read operation is the same as in the first embodiment.

(Erase)

In an erase operation, an address is specified first, thereby selectinga block shown by a broken line in FIG. 3 as described earlier. Next, thepotential of a well where the cell is formed is raised to a high voltage(about 20 V), the word line of the selected block is set to Vss, and theword lines of the unselected blocks are made floating. Then, a highvoltage is applied between the cell of the selected block and the well,which erases the data stored in the cell. On the other hand, in theunselected blocks, since the word lines are in the floating state, whenthe well is raised to a high voltage, the word lines are also raised toa high voltage. As a result, the data stored in the memory cells in theunselected blocks are not erased.

After an erase operation, the data in the memory cell becomes “0”. Evenif either the first or the second page read operation is carried out,data “1” is outputted.

(Write after Erase)

FIG. 33E shows an example of the threshold voltages after an eraseoperation. As described above, since the data in a plurality of memorycells in a block is erased simultaneously, there may be a case whereeven a voltage lower than the threshold voltage shown in FIG. 33A hasbeen erased. When there is a memory cell where even a voltage lower thanthe original threshold voltage has been erased, the threshold voltagevarying range becomes larger in writing data “1” into the memory cellhaving data “0” in an upper page (e.g., second page) program. As aresult, the threshold voltage of the adjoining cells varies as a resultof the coupling between their floating gates.

To prevent the threshold voltage of the adjoining cells from varying,slight writing is done after an erase operation as shown in FIG. 33F,thereby returning the threshold voltage of the cell where even a voltagelower than the original threshold voltage has been erased to theoriginal threshold voltage.

In a write after erase operation, the PDCs of all of the data storagecircuits are set to the low level. Thereafter, the cells connected totwo bit lines BLE and BL0 connected to a data storage circuit arewritten into simultaneously. In a write verify operation, one of the twobit lines is written into at a time. Since it takes time to verify allof the cells in the block, all of the word lines are set to the samepotential and one NAND cell is verified simultaneously. When a writeafter erase operation has been completed on one of the bits lines, thePDC is made high, preventing the next program from being executed.Similarly, a verify operation is carried out on the other bit line. Thewrite and verify operation is repeated until the data in all of the datastorage circuits has become high.

With the fourth embodiment, in the middle of the second page writeverify operation, the word line potential is changed in the order ofthreshold voltages “b′, c*′, c′” in charging the hit line once, therebyverifying the threshold voltages “b′, c*′, c′” simultaneously. Thisenables a high-speed verify operation, which makes a high-speed writeoperation possible.

In addition, while data “3” is being written into the memory cell, whena verify potential a little lower than the original verify potential hasbeen exceeded, an intermediate potential is applied to the bit line andthe writing is done. This makes it possible to narrow the distributionof threshold voltages written in the memory cell. Therefore, the step-upwidth of the write voltage can be made greater, which enables theoverall write time to be shortened and therefore a write operation to becarried out at higher speed.

Specifically, in a write operation, when it is verified whether thememory cell has reached the threshold voltage of data “3”, the verifyoperation is carried out using a verify potential “c*′” lower than theoriginal verify potential “c′”. If the lower verify potential “c*′” hasbeen exceeded and the write operation has not been completed with theoriginal verify potential “c′”, the DDC, PDC, SDC in the data storagecircuit have the data in writing data “2”. Therefore, in the next writeoperation, the intermediate potential is supplied to the bit line,thereby making the write speed slower. Thereafter, since the memoryskips a verify operation in verifying data “2”, the writing of the cellis completed. Therefore, the distribution of threshold voltages writtenin the memory cell can be made narrower.

Moreover, since a data storage circuit for distinguishing between amemory cell where a verify potential lower than the original verifypotential has been exceeded and a memory cell where the original verifypotential has been exceeded is not needed, an increase in the circuitconfiguration can be prevented.

Fifth Embodiment

In the fourth embodiment, the second page has been written into asfollows. As for the cells into which data “3” is to be written, anintermediate potential is supplied to a cell where a verify potential“c*′” lower than the original verify potential “c′” is exceeded andwriting is done once. Then, the write operation is completed. As for thecells into which data “1” is to be written, the intermediate potentialis supplied to a cell where a verify potential “a*′” lower than theoriginal verify potential “a′” is exceeded. Then, the write operation isrepeated until the original verify potential “a′” has been reached.Therefore, the operation differs a little, depending on the data to bewritten.

In contrast, in a fifth embodiment of the present invention, a cell intowhich data “1” is to be written is written into in the same manner as acell into which data “3” is to be written. Specifically, theintermediate potential is supplied to a cell where a verify potential“a*′” lower than the original verify potential “a′” is exceeded andwriting is done once. Then, the write operation is completed. Inaddition, when the first page is written into, the intermediatepotential is supplied to a cell where a verify potential “v*′” lowerthan the original verify potential “v′” is exceeded and writing is doneonce. Then, the write operation is completed.

Hereinafter, these operations will be explained concretely by referenceto FIGS. 39 to 43.

(First Page Write Operation)

First, a first page write operation will be explained. A first pageprogram operation and a program verify operation are the same as in themodification of the first embodiment of FIG. 8. However, as shown inFIG. 39A, in a program verify operation, “1” is set in the DDC of a cellwhere the verify potential “v*′” lower than the original verifypotential “v′” is exceeded. In the next program, if the PDC has “0” andthe DDC has “1”, the intermediate potential (e.g. 1 V) is supplied tothe bit line and writing is done.

Since the TDC is composed of a capacitor, the data in the DDC istransferred to the TDC, the data in the PDC is transferred to the DDC,and the data in the TDC is transferred to the PDC in the write recoveryoperation as shown in FIG. 39B (after data refresh 1).

Furthermore, as shown in FIG. 39C (after data refresh 2), the data inthe DDC is transferred to the TDC, the data in the PDC is transferred tothe DDC, and the data in the TDC is transferred to the PDC, therebyrefreshing the data in the DDC. However, in the operation of FIG. 39C,when the data in the DDC is transferred to the TDC, if the data in theDDC (1: writing unselected, 0: writing) is transferred without resettingthe value in the TDC (verify potential “a*′” is exceeded->1) shown inFIG. 39B, the TDC has “1” even when the verify potential “a*′” isexceeded. Thus, the PDC indicates that writing is unselected.Accordingly, when the verify potential “a*′” is exceeded, theintermediate potential is supplied to the bit line only once and is thenprogrammed.

(Second Page Write Operation)

In a second page write operation, the intermediate potential is suppliedto a cell where a verify potential “a*′” lower than original verifypotential “a′”. Then, writing is done only once and the write operationis completed.

A program verify operation is the same as in FIG. 35. In a programverify operation, as shown in FIG. 40, the DDC is set to “1” in a cellwhere a verify potential “a*′” lower than the original verify potential“a′” is exceeded. When the PDC has “0” and the DDC has “1” in the nextprogram, the intermediate potential is supplied to the bit line andwriting is done. Thus, after the intermediate potential is supplied tothe bit line and writing is done once, the PDC is set to “1”. Then, thewrite operation is completed.

Hereinafter, the operation will be explained concretely.

In the middle of programming, the signal BLCLAMP is made low, therebydisconnecting the PDC and the DDC from the bit line. Since the bit linehas a large capacitance, the write operation is continued even when thePDC and DDC are disconnected from the bit line.

Thereafter, the signal BLPRE is made high, the signal VPRE is made high,and the TDC is set to the high level. Furthermore, the signal REG ismade high and the signal VREG is made low. If the DDC has “1”, the TDCis set to the low level. If the DDC has “0”, the TDC is kept at the highlevel. In this state, the data in the TDC is transferred to the PDC. Atthe same time, the DTG is set high, causing both the DDC and the PDC tohold the same data as shown in FIG. 41A.

Next, the signal BLC2 is made high, thereby transferring the data in theSDC to the TDC. Then, the signal REG is made high and the signal VREG isset to Vss. In this state, if the DDC has “1”, the TDC is forced to golow and then the data in TDC is transferred to the PDC (FIG. 41B).

Thereafter, the signal BLPRE is made high, the signal VPRE is made high,and the TDC is set to the high level. Furthermore, the signal REG ismade high and the signal VREG is made low. If the DDC has “1”, the TDCis set to the low level. If the DDC has “0”, the TDC is kept at the highlevel. After the signal DTG is set to “1”, thereby transferring the datain the PDC to the DDC, the data in the TDC is transferred to the PDC(FIG. 42A).

Next, after the signal BLPRE is made high and the signal VPRE is madehigh, thereby setting the TDC to the high level, the signal BLCLAMP isset to a specific voltage. Then, if the bit line is at the low level(“0”) or the intermediate potential, the TDC is at the low level. If thebit high is at the high level, the TDC is at the high level. Thereafter,the signal VREG is set to Vdd and the signal REG is set high. Then, ifthe DDC is at the high level, the TDC is forced to go high. Thereafter,the data in the PDC is transferred to the DDC and the data in the TDC tothe PDC. The data in the DDC is the originally held data. However, thePDC goes high, if the DDC is at the high level, and the SDC is at thehigh level, that is, if the verify potential “a*′” lower than theoriginal verify potential “a′” is exceeded, that is, indicates thatwriting is unselected. Therefore, if the verify potential “a*′” isexceeded, the bit line is set to the intermediate potential only onceand programming is done (FIG. 42B).

With the fifth embodiment, in a second page write operation, data can bewritten by the same writing method into a cell into which data “1” is tobe written and a cell into which data “0” is to be written.Specifically, the intermediate potential is supplied to a cell where theverify potential “a*′” lower than the original verify potential “a′” isexceeded and writing is done only once. Then, the write operation iscompleted. Therefore, a higher-speed write operation can be realized.

Furthermore, in a first page data write operation, too, the intermediatepotential is supplied to a cell where the verify potential “v*′” lowerthan the original verify potential “v′” is exceeded and writing is doneonly once. Then, the write operation is completed. Therefore, a stillhigher-speed write operation can be realized.

Sixth Embodiment

Next, a sixth embodiment of the present invention will be explained byreference to FIGS. 43 to 52.

In the sixth embodiment, the configuration of the memory cell array andthe arrangement of data storage circuits are the same as those in thesecond and third embodiments. In the sixth embodiment, 8-valued (3 bitsof) data is stored in a memory cell.

The relationship between data to be written and the threshold voltagesof a memory cell shown in FIGS. 43A, 43B, 43C and FIGS. 44A and 44B arethe same as in FIGS. 20A, 20B, 20C and FIGS. 21A and 21B. In addition, afirst page and a second page program operation are almost the same asthose in the fourth embodiment. Specifically, in a first page and asecond page program operation, when it is verified whether the data inthe memory cell has reached the original threshold voltage, theverification is made using a verify potential lower than usual. Thesixth embodiment differs from the fourth embodiment in a third pageprogram operation.

(Third Page Program)

FIGS. 45 and 46 are flowcharts for a third page program operation. In athird page program operation, an address is specified first, therebyselecting three pages shown in FIG. 19.

Next, the data storage circuits 10 are reset (S351) and writing data isexternally inputted into the SDCs of all of the data storage circuits 10(S352). If data “1” is externally inputted (if no writing is done), theSDC in the data storage circuit 10 of FIG. 6 goes low. If data “0” isexternally inputted (if writing is done), the SDG goes high.

In the third page program operation, as shown in FIG. 44B, when the datain the memory cell is “0” and when the externally inputted data is “1”,the data in the memory cell is kept at “0”. When the externally inputteddata is “0”, the data in the memory cell is set to “1”.

When the data in the memory cell is “2” and when the externally inputteddata is “1”, the data in the memory cell remains at “2”. However, in asecond page write operation, when it is verified whether the data in thememory cell has reached “2”, a verify potential “b*′” lower than theoriginal one is used. For this reason, a memory cell storing data “2” iswritten into to the original verify potential “b′”. When the data in thememory cell is “2” and when the externally inputted data is “0”, thedata in the memory cell is set to “3”.

When the data in the memory cell is “4” and when the externally inputteddata is “1”, the data in the memory cell remains at “4”. However, in asecond page write operation, when it is verified whether the data in thememory cell has reached “4”, a verify potential “d*′” lower than theoriginal one is used. For this reason, a memory cell storing data “4” iswritten into to the original verify potential “d′”. When the data in thememory cell is “4” and when the externally inputted data is “0”, thedata in the memory cell is set to “5”.

When the data in the memory cell is “6” and when the externally inputteddata is “1”, the data in the memory cell remains at “6”. However, in asecond page write operation, when it is verified whether the data in thememory cell has reached “6”, a verify potential “f*′” lower than theoriginal one is used. For this reason, a memory cell storing data “6” iswritten into to the original verify potential “f′”. When the data in thememory cell is “6” and when the externally inputted data is “0”, thedata in the memory cell is set to “7”.

In the sixth embodiment, writing is done in this way. However, the datato be written and read and the data in the memory cell may be dealt withas shown in the second and third embodiments.

Furthermore, when data “3”, “5”, “7” are written into a cell, a verifyoperation is carried out using a threshold voltage lower than theoriginal verify potential. When the threshold voltage has been exceededand when the write operation has not been completed using the originalverify potential, an intermediate potential is supplied to the bit linein the next write operation, thereby making the write speed slower.Then, writing is done once and the write operation is completed. In acell where the original verify potential has been exceeded, the writeoperation is ended at that time.

In addition, when data “1” is written into a memory cell, a verifyoperation is carried out using a verify voltage lower than the originalverify potential. When the verify potential lower than the originalverify potential has been exceeded, the intermediate potential issupplied to the bit line in the next and later write operations, therebymaking the write speed slower. Then, the cell is written into until theoriginal verify potential has been exceeded.

(Third Page First-Session Program)

In a third page program operation, data “1” to “7” are written into amemory cell. These data items can be programmed simultaneously. However,in the sixth embodiment, four data “4” to “7” are written into a memorycell first. Then, data “1” to “3” are written into the memory cell.Thereinafter, these operations will be explained concretely.

First, the data storage circuits are reset and data is externally loadedinto the SDCs of the data storage circuits (FIG. 45, S351, S352).

(Internal Data Read 1 and Data Cache Setting 1) (S353, S354)

Before data is written into the memory cell, it is determined whetherthe data in the second page memory cell is either “4” or “6” or either“0” or “2”, whether the data in the memory cell is “6”, and whether thedata in the memory cell is any one of “0”, “2”, and “4”. To do this, theword line potential is set to “d*” and “f*” in that order. Then, thedata written in the memory cell is read and set in the data cache.

FIG. 47A shows the state of the data cache after the internal readoperation. Thereafter, the data cache is operated to set the data cacheas shown in FIG. 47B. Then, for example, the counter (PC) is initializedto zero and the data in the fifth flag cell is loaded.

In FIG. 47B, to set the data in the memory cell at “0” to “3,” the PDCis set at the high level (“1”). To set the data in the memory cell at“4”, the PDC is set at the low level (“0”), the DDC is set high, and theSDC is set high. To set the data in the memory cell at “5”, the PDC isset low, the DDC is set low, and the SDC is set high. To set the data inthe memory cell at “6”, the PDC is set low, the DDC is set high, and theSDC is set low. To set the data in the memory cell at “7”, each of thePDC, DDC, and SDC is set low.

(Program: First Session) (S355)

After the counter (PC) is counted up, data is written into the memorycell. As in the second embodiment, in the sixth embodiment, unnecessaryverify operations are skipped using the value of the counter and apredetermined number of verify starts.

First, when the signal BLC1 is set at Vsg, if the PDC has data “0”, thebit line is at Vss. If the PDC has data “1”, the bit line is at Vdd.Next, after the signal BLC1 is set at Vss, the signal VREG is set at Vddand the signal REG is set at the intermediate potential (e.g., 1 V+Vth).Then, if the DDC has data “1”, the bit line is at the intermediatepotential. If the DDC has data “0”, the bit line is not precharged. As aresult, only when data “5”, “7” have been written in the memory cell,the bit line is at Vss. When data “4”, “6” have written in the memorycell, the bit line is at the intermediate potential (e.g., 1 V). If thedata in the memory cell is “0” to “3” (if no writing is done), the bitline is at Vdd. Here, the selected word line is set at Vpgm and theunselected word line is set at Vpass. If the bit line is at Vdd, nowriting is done. If the bit line is at Vss, writing is done. If the bitline is at the intermediate potential (e.g., 1 V), writing is done alittle. Accordingly, a memory cell in which data “4”, “6” have beenwritten might be written into insufficiently. However, since data “4”and data “5” in the memory cell are verified simultaneously and data “6”and data “7” in the memory cell are verified simultaneously, the writetime ends earlier when they are written as simultaneously as possible.Therefore, the intermediate potential is supplied to the bit line.

(Verification Using Only “d”) (S356 to S358, FIG. 48A)

Thereafter, the verify voltage “d′” is set and a write verify operationis carried out. First, when the signal BLC2 is made high Vdd+Vth and thesignal BLCLAMP is set to a specific potential, the bit line isprecharged. At this time, what is precharged is only a memory cell whoseSDC is at the high level, that is, a memory cell in which data “5”, “4”have been written.

Next, the verify potential “d′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC. Thereafter, the data in thePDC is transferred to the DDC and the data in the TDC is transferred tothe PDC. Then, the TDC is charged to Vdd. Thereafter, the signal BLCLAMPis set to a specific potential. Then, it is when data “4” and data “5”have been written in the memory cell and the threshold voltage hasbecome equal to or higher than the verify potential “d′” that the TDCgoes high. Thereafter, the signal BLC1 is set to the intermediatepotential (Vth+0.5 V). When the PDC is at the low level or when data “5”has been written in the memory cell, the TDC goes low. Therefore, it iswhen data “4” has been written in the memory cell and the thresholdvoltage has become equal to or higher than the verify potential “d′”that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “4” has been written in the memorycell and the verify potential “d′” has been reached, or when writing isunselected that the TDC goes to Vdd. Then, the signal DTG is set to Vsgand the data in the PDC is copied into the DDC. Thereafter, the signalBLC1 is set to Vsg and the potential of the TDC is loaded into the PDC.

(Simultaneous Verification Using “d′”, “e*”, “e′”) (S359 to S361, FIG.48B)

As the program is repeated several times, the writing of data “5” intothe memory cell is getting closer to completion. Therefore, a verifyoperation using the verify potential “e′” is carried out. In this verifyoperation, verifications are made using “d′”, “e*′”, and “e′”simultaneously.

First, the signal BLC2 is set to the high level and the signal BLCLAMPis set to a specific potential, thereby precharging the bit line. Atthis time, what is precharged is only a memory cell whose SDC is at thehigh level, that is, a memory cell in which data “5”, “4” have beenwritten.

Next, the verify potential “d′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC. Thereafter, the data in thePDC is transferred to the DDC and the data in the TDC is transferred tothe PDC. Then, after the TDC is charged to Vdd, the signal BLCLAMP isset to a specific potential. Then, it is when data “4” and “5” have beenwritten in the memory cell and the threshold voltage is equal to orhigher than the verify potential “d′” that the TDC goes high.Thereafter, the signal BLC1 is set to the intermediate potential(Vth+0.5 V). When the PDC is at the low level, if data “5” has beenwritten in the memory cell, the TDC goes low. Therefore, it is when data“4” has been written in the memory cell and the threshold voltagebecomes equal to or higher than the verify potential “d′” that the TDCgoes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “4” has been written in the memorycell and the verify potential “d′” has been reached or when writing isunselected that the TDC goes to Vdd. After the signal DTG is set to Vsgand the data in the PDC is copied into the DDC, the signal BLC1 is setto Vsg and the potential of the TDC is loaded into the PDC.

Thereafter, the verify potential “e*′” is supplied to the word line andthe bit line is discharged. Then, the TDC is charged to Vdd. Thereafter,the signal BLCLAMP is set to the specific potential. Thus, it is whenthe threshold voltage of the cell is equal to or higher than the verifypotential “e*′” that the TDC goes high. That is, it is when data “5” hasbeen written in the memory cell and the verify potential “e*′” has beenreached that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “5” has been written in the memorycell and the verify potential “e*′” has been reached or when data “0”,“2”, “4”, “6” have been written in the memory cell that the TDC goes toVdd. After the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC, the signal BLC1 is set to Vsg and the potential ofthe TDC is loaded into the PDC.

Thereafter, the verify potential “e′” is supplied to the word line andthe bit line is discharged. Then, the TDC is charged to Vdd. Thereafter,the signal BLCLAMP is set to the specific potential. Thus, it is whenthe threshold voltage of the cell is equal to or higher than the verifypotential “e′” that the TDC goes high. That is, it is when data “5” hasbeen written in the memory cell and the verify potential “e′” has beenreached that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “5” has been written in the memorycell and the verify potential “e′” has been reached or when writing isunselected that the TDC goes to Vdd. After the signal DTG is set to Vsgand the data in the PDC is copied into the DDC, the signal BLC1 is setto Vsg and the potential of the TDC is loaded into the PDC.

When data “5” has been written in the memory cell, the verify potential“e*′” has been reached, and the write operation has not been completedin the verification using the verify potential “e′”, the data in thedata storage circuit is as follows: SDC=“1”, DDC=“1”, and PDC=“0”. Thisis the same as the data in the data storage circuit when data “4” hasbeen written in the memory cell. Specifically, when data “5” has beenwritten in the memory cell and the verify potential “e*′” has beenreached, data “4” is being written into the memory cell. When data “4”is being written into the memory cell, the intermediate potential issupplied to the bit line. Therefore, in the next write operation, thememory cell is written a little. In the next simultaneous verificationusing “d′”, “e*′”, “e′”, this cell never fails to skip the verifyoperation, because the threshold voltage of the cell is equal to orhigher than “e*′” in a verify operation using “d′”. Thus, a second andlater write operations will not be carried out.

(Verify Operation Using Only the Verify Potential “f′”) (S362 to S364,FIG. 49A)

In a verify operation using only the verify potential “f′”, the signalVPRE is made high, the signal BLPRE is set to Vdd+Vth, and the signalBLCLAMP is set to a specific potential, thereby precharging the bitline.

Next, the verify potential “f” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC.

Thereafter, the data in the PDC is transferred to the DDC and the datain the TDC is transferred to the PDC. Then, the TDC is charged to Vdd.Thereafter, the signal BLCLAMP is set to a specific potential. Then, itis when data “6” and data “7′” have been written in the memory cell andthe threshold voltage has become equal to or higher than the verifypotential “f′” that the TDC goes high. Thereafter, the signal BLC1 isset to the intermediate potential (Vth+0.5 V). When the PDC is at thelow level or when data “7” has been written in the memory cell, the TDCgoes low. Therefore, it is when data “6” has been written in the memorycell and the threshold voltage has become equal to or higher than theverify potential “f′” that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “6” has been written in the memorycell and the verify potential “f′” has been reached, or when writing isunselected that the TDC goes to Vdd. Then, the signal DTG is set to Vsgand the data in the PDC is copied into the DDC. Thereafter, the signalBLC1 is set to Vsg and the potential of the TDC is loaded into the PDC.

(Simultaneous Verify Using “f′”, “g*′”, “g′”) (S365, S366, FIG. 49B)

As the program is repeated several times, the writing of data “7” intothe memory cell is getting closer to completion. Therefore, a verifyoperation using the verify potential “g′” is carried out. In this verifyoperation, verifications are made using “f′”, “g*′”, and “g′”simultaneously.

First, the signal VPRE is set to the high level, the signal BLPRE is setto Vdd+Vth, and the signal BLCLAMP is set to a specific potential. Then,the bit line is precharged.

Next, the verify potential “f′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC. Thereafter, the data in thePDC is transferred to the DDC and the data in the TDC is transferred tothe PDC. Then, the TDC is charged to Vdd. Thereafter, the signal BLCLAMPis set to a specific potential. Then, it is when data “6” and “7” havebeen written in the memory cell and the threshold voltage is equal to orhigher than the verify potential “f” that the TDC goes high. Thereafter,the signal BLC1 is set to the intermediate potential (Vth+0.5 V). Whenthe PDC is at the low level, if data “7” has been written in the memorycell, the TDC goes low. Therefore, it is when data “6” has been writtenin the memory cell and the threshold voltage becomes equal to or higherthan the verify potential “f” that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “6” has been written in the memorycell and the verify potential “f” has been reached or when writing isunselected that the TDC goes to Vdd. After the signal DTG is set to Vsgand the data in the PDC is copied into the DDC, the signal BLC1 is setto Vsg and the potential of the TDC is loaded into the PDC.

Thereafter, the verify potential “g*′” is supplied to the word line andthe bit line is discharged. Then, the TDC is charged to Vdd. Thereafter,the signal BLCLAMP is set to the specific potential. Thus, it is whenthe threshold voltage of the cell is equal to or higher than the verifypotential “g*′” that the TDC goes high. That is, it is when data “7” hasbeen written in the memory cell and the verify potential “g*′” has beenreached that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “7” has been written in the memorycell and the verify potential “g*′” has been reached or when data “0”,“2”, “4”, “6” have been written in the memory cell that the TDC goes toVdd. After the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC, the signal BLC1 is set to Vsg and the potential ofthe TDC is loaded into the PDC.

Thereafter, the verify potential “g′” is supplied to the word line andthe bit line is discharged. Then, the TDC is charged to Vdd. Thereafter,the signal BLCLAMP is set to the specific potential. Thus, it is whenthe threshold voltage of the cell is equal to or higher than the verifypotential “g′” that the TDC goes high. That is, it is when data “7” hasbeen written in the memory cell and the verify potential “g′” has beenreached that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “7” has been written in the memorycell and the verify potential “g′” has been reached or when writing isunselected that the TDC goes to Vdd. After the signal DTG is set to Vsgand the data in the PDC is copied into the DDC, the signal BLC1 is setto Vsg and the potential of the TDC is loaded into the PDC.

When data “7” has been written in the memory cell, the verify potential“g*′” has been reached, and the write operation has not been completedin the verification using the verify potential “g′”, the data in thedata storage circuit is as follows: SDC=“0”, DDC=“1”, and PDC=“0”. Thisis the same as the data in the data storage circuit when data “6” hasbeen written in the memory cell. Specifically, when data “7” has beenwritten in the memory cell and the verify potential “g*′” has beenreached, data “6” is being written into the memory cell. When data “6”is being written into the memory cell, the intermediate potential issupplied to the bit line. Therefore, in the next write operation, thememory cell is written a little. In the next simultaneous verificationusing “f′”, “f*′”, “g′”, this cell never fails to skip the verifyoperation, because the threshold voltage of the cell is equal to orhigher than “g*′” in a verify operation using “f′”. Thus, a second andlater write operations will not be carried out.

In this way, the program and verify operation is repeated until the datain all of the PDCs has become “1” (S367, S368). However, when the datain the DDC is “1” in a write operation, that is, when data “4” has beenwritten in the memory cell, when data “6” has been written in the memorycell, when data “5” has been written in the memory cell and the verifypotential “e*′” has been exceeded, or when data “7” has been written inthe memory cell and the verify potential “g*′” has been exceeded, thebit line is set to the intermediate potential and a write operation iscarried out. Each time the program and verify operation is repeated, theprogram voltage Vpgm is raised little by little. In this way, in thefirst-session program, four data “4” to “7” are written into the memorycell.

In the above explanation, after the first-session program, four verifyoperations are carried out. In the initial loop of the program, thethreshold voltage does not rise. Thus, only a verify operation using theverify potentials “d′” is carried out at first. Next, a simultaneousverify operation using the verify potentials “d′”, “e*′”, “e′” iscarried out. Then, a simultaneous verify operation using the verifypotentials “d′”, “e*′”, “e′” and a verify operation using only “f” arecarried out. Finally, a simultaneous verify operation using the verifypotentials “d′”, “e*′”, “e′” and a simultaneous verify operation usingthe verify potentials “f′”, “g*′”, “g′” may be carried out.

In a loop close to the end of the program, since the writing of data “4”and “5” into the memory cell has been completed, the simultaneous verifyoperations using the verify potentials “d′”, “e*′”, “e′” may be omittedand finally only a simultaneous verify operation using “f′”, “g*′”, “g′”may be carried out.

(Second-Session Program)

In a second-session program, three data “1” to “3” are written into thememory cell. A memory cell into which data “1” is to be written has notbeen written into at all. Therefore, as in the first embodiment, averify potential “a*′” lower than the original verify potential isprovided. The intermediate potential is supplied to the bit line of acell whose threshold voltage has exceeded the verify potential “a*′”.This makes the write speed slower and the threshold value distributionnarrower. Since data “2” and data “3” are verified simultaneously, thewrite time ends earlier when they are written as simultaneously aspossible. Therefore, even when data “2” is being written into the memorycell, the intermediate potential is supplied to the bit line, therebymaking the write speed slower.

(Internal Data Read 2 and Data Cache Setting 2) (S369, S370, FIG. 50)

Before data is written into the memory cell, the word line potential isset to “b*(=a)” and “d*” in that order and an internal read operation iscarried out.

Thereafter, the data cache is operated to set the data cache as shown inFIG. 50A (S110). Specifically, to write data “0” into the memory cell,the PDC is set at “1”, the DDC is set at “1”, and the SDC is set at “1”.To write data “1” into the memory cell, the PDC is set at “0”, the DDCis set at “0”/“1”, and the SDC is set at “1”. To write data “2” into thememory cell, the PDC is set at “0”, the DDC is set at “1”, and the SDCis set at “0”. To write data “3” into the memory cell, the PDC is set at“0”, the DDC is set at “0”, and the SDC is set at “0”. To write data “4”to “7” into the memory cell, the PDC is always set at “1”.

(Program: Second Session) (S371)

Here, for example, the counter (PC) is initialized to zero.

Next, for example, after the counter (PC) is counted up, data is writteninto the memory cell. First, when the signal BLC1 is set at theintermediate potential (Vdd+Vth), if the PDC has data “0”, the bit lineis at Vss. If the PDC has data “1”, the bit line is at Vdd. Next, afterthe signal BLC1 is set at Vss, the signal VREG is set at Vdd and thesignal REG is set at the intermediate potential (e.g., 1 V+Vth). Then,if the DDC has data “1”, the bit line is at the intermediate potential(e.g., 1 V). If the DDC has data “0”, the bit line is not precharged. Asa result, when data “3” has been written in the memory cell or when data“1” has been written in the memory cell and the threshold voltage isequal to or lower than the verify potential “a*′” lower than theoriginal verify potential, the bit line is at Vss. When data “2” hasbeen written in the memory cell, when data “1” has been written in thememory cell and the threshold voltage has exceeded the verify potential“a*′” lower than the original potential, or when the bit line is at theintermediate potential (IV) and the data in the memory cell is “0”, “4”to “7” (when no writing is done), the bit line is at Vdd. Here, theselected word line is set at Vpgm and the unselected word line is set atVpass. If the bit line is at Vdd, no writing is done. If the bit line isat Vss, writing is done. If the bit line is at the intermediatepotential (1 V), writing is done a little. Since verify operations inwriting data “2” and data “3” into the memory cell are carried outsimultaneously, the write time ends earlier when they are written assimultaneously as possible. Therefore, the intermediate potential issupplied to the bit line.

(Verification Using “a′, a*′”) (S372 to S374, FIG. 50B)

In a verify operation using the verify potentials “a′, a*′”, the signalVPRE is made high, the signal BLPRE is set to Vdd+Vth, and the signalBLCLAMP is set to a specific potential. Then, the bit line isprecharged. Next, the verify potential “a*′” is supplied to the wordline, thereby discharging the bit line.

Then, the TDC is charged to Vdd. Thereafter, the signal BLCLAMP is setto a specific potential. Then, it is when the threshold voltage of thecell is equal to or higher than the verify potential “a*′” that the TDCgoes high. Next, the signal BLC2 is set to the intermediate potential(Vth+0.5 V). When the SDC is at the low level, the TDC goes low.Therefore, it is when data “1” has been written in the memory cell andthe verify potential “a*′” has been reached that the TDC goes high.Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “1” has been written in the memorycell and the verify potential “a*′” has been reached or when data “0”,“2”, “4”, “6” have been written in the memory cell that the TDC goes toVdd. After the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC, the signal BLC1 is set to Vsg and the potential ofthe TDC is loaded into the PDC.

Thereafter, the verify potential “a′” is supplied to the word line andthe bit line is discharged. Then, the TDC is charged to Vdd. Thereafter,the signal BLCLAMP is set to the specific potential. Thus, it is whenthe threshold voltage of the cell is equal to or higher than the verifypotential “a′” that the TDC goes high. Next, when the signal BLC2 is setto the intermediate potential (Vth+0.5 V), if the SDC is at the lowlevel (“0”), the TDC goes to the high level (“1”). That is, it is whendata “1” has been written in the memory cell and the verify potential“a′” has been reached that the TDC goes high. Next, when the signal VREGis made high and the signal REG is set to Vsg, if the data in the DDC isat the high level, the TDC is forced to go high. Therefore, it is whendata “1” has been written in the memory cell and the verify potential“a′” has been reached or when writing is unselected that the TDC goes toVdd. After the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC, the signal BLC1 is set to Vsg and the potential ofthe TDC is loaded into the PDC (FIG. 51).

(Verify Potential “b′”) (S375 to S377, FIG. 51B)

In a verify operation using only the verify potential “b′”, the signalVPRE is made high, the signal BLPRE is set to Vdd+Vth, and the signalBLCLAMP is set to a specific potential, thereby precharging the bitline.

Next, the verify potential “b′” is supplied to the word line, therebydischarging the bit line. While the bit line is being discharged, thedata in the DDC is transferred to the TDC, the data in the PDC istransferred to the DDC, and the data in the TDC is transferred to thePDC. Furthermore, while the bit line is being discharged, the signalVREG is set to Vss, the signal REG is set to Vdd, and the signal BLCLAMPis set to a specific voltage. If the DDC is at the high level (“1”),that is, if writing is unselected, the bit line is forced to go low.Thereafter, the TDC is charged to Vdd. Then, the signal BLCLAMP is setto a specific potential. Therefore, the data in the memory cell hasbecome equal to or higher than the verify potential “b′” that the TDCgoes high. Thereafter, the signal BLC1 is set to the intermediatepotential (Vth+0.5 V). When the PDC is at the low level or when data “3”has been written in the memory cell, the TDC goes low. Therefore, it iswhen data “2” has been written in the memory cell and the thresholdvoltage has become equal to or higher than the verify potential “b′”that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “2” has been written in the memorycell and the verify potential “b′” has been reached, or when writing isunselected that the TDC goes to Vdd. Then, the signal DTG is set to Vsgand the data in the PDC is copied into the DDC. Thereafter, the signalBLC1 is set to Vsg and the potential of the TDC is loaded into the PDC.

(Simultaneous Verification Using “b′”, “c*′”, “c′”) (S378, S379, FIG.52)

As the program is repeated several times, the writing of data “2” intothe memory cell is getting closer to completion. Therefore, a verifyoperation using the verify potential “c′” is carried out. In this verifyoperation, verifications are made using “b′”, “c*′”, and “c′”simultaneously.

First, the signal VPRE is set to the high level, the signal BLPRE is setto Vdd+Vth, and the signal BLCLAMP is set to a specific potential. Then,the bit line is precharged. Next, the verify potential “b′” is suppliedto the word line, thereby discharging the bit line. While the bit lineis being discharged, the data in the DDC is transferred to the TDC, thedata in the PDC is transferred to the DDC, and the data in the TDC istransferred to the PDC. Furthermore, while the bit line is beingdischarged, the signal VREG is set to Vss, the signal REG is set to Vdd,and the signal BLCLAMP is set to a specific voltage. When the DDC has“1”, that is, when writing is unselected, the bit line is forced to golow. Thereafter, the TDC is charged to Vdd. Then, the signal BLCLAMP isset to a specific potential. Therefore, it is when data “2” has beenwritten in the memory cell and the threshold voltage is equal to orhigher than the verify potential “b′” that the TDC goes high.Thereafter, the signal BLC1 is set to the intermediate potential(Vth+0.5 V). When the PDC is at the low level, that is, when data “3”has been written in the memory cell, the TDC goes low. Therefore, it iswhen data “2” has been written in the memory cell and the thresholdvoltage is equal to or higher than the verify potential “b′” that theTDC goes high.

Thereafter, the verify potential “c*′” is supplied to the word line,thereby discharging the bit line. Then, the TDC is charged to Vdd.Thereafter, the signal BLCLAMP is set to a specific potential. Then, itis when the threshold voltage of the cell is equal to or higher than theverify potential “c*′” that the TDC goes high. That is, it is when data“3” has been written in the memory cell and the verify potential “c*′”has been reached that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “3” has been written in the memorycell and the verify potential “c*′” has been reached or when data “0”,“2”, “4”, “6” have been written in the memory cell that the TDC goes toVdd. After the signal DTG is set to Vsg and the data in the PDC iscopied into the DDC, the signal BLC1 is set to Vsg and the potential ofthe TDC is loaded into the PDC.

Thereafter, the verify potential “c′” is supplied to the word line andthe bit line is discharged. Then, the TDC is charged to Vdd. Thereafter,the signal BLCLAMP is set to the specific potential. Thus, it is whenthe threshold voltage of the cell is equal to or higher than the verifypotential “c′” that the TDC goes high. That is, it is when data “3” hasbeen written in the memory cell and the verify potential “c′” has beenreached that the TDC goes high.

Next, when the signal VREG is made high and the signal REG is set toVsg, if the data in the DDC is at the high level, the TDC is forced togo high. Therefore, it is when data “3” has been written in the memorycell and the verify potential “c′” has been reached or when writing isunselected that the TDC goes to Vdd. After the signal DTG is set to Vsgand the data in the PDC is copied into the DDC, the signal BLC1 is setto Vsg and the potential of the TDC is loaded into the PDC.

When data “3” has been written in the memory cell, the verify potential“c*′” has been reached, and the write operation has not been completedin the verification using the verify potential “g′”, the data in thedata storage circuit is as follows: SDC=“0”, DDC=“1”, and PDC=“0”. Thisis the same as the data in the data storage circuit when data “2” hasbeen written in the memory cell. Specifically, when data “3” has beenwritten in the memory cell and the verify potential “c*′” has beenreached, data “2” is being written into the memory cell. When data “2”is being written into the memory cell, the intermediate potential issupplied to the bit line. Therefore, in the next write operation, thememory cell is written a little. In the next simultaneous verificationusing “b′”, “c*′”, “c′”, this memory cell never fails to skip the verifyoperation, because the threshold voltage of the cell is equal to orhigher than “c*′” in a verify operation using “b′”. Thus, a second andlater write operations will not be carried out.

In this way, the program and verify operation is repeated until the datain all of the PDCs has become “I” (S380, S381). However, when the datain the DDC is “1” in a write operation, that is, when data “1” has beenwritten in the memory cell, when data “3” has been written in the memorycell and the verify potential “a*′” has been exceeded, when data “2” hasbeen written in the memory cell, or when data “3” has been written inthe memory cell and the verify potential “c*′” has been exceeded, thebit line is set to the intermediate potential and a write operation iscarried out. Each time the program and verify operation is repeated, theprogram voltage Vpgm is raised little by little. In this way, in thesecond-session program, three data “1” to “3” are written into thememory cell.

When the PDC is at the low level, the write operation is carried outagain. The program operation and the verify operation are repeated untilthe data in the PDCs of all of the data storage circuits has becomehigh.

In the above explanation, after the first-session program, two verifyoperations are carried out. In the initial loop of the program, thethreshold voltage does not rise. Thus, only a verify operation using theverify potentials “a′, a*′” is carried out at first. Next, a verifyoperation using the verify potentials “a′, a*′” and a verify operationusing the verify potential “b′” are carried out. Finally, a verifyoperation using the verify potentials “a′, a*′” and a simultaneousverify operation using the verify potentials “b′”, “c′” may be carriedout.

In a loop close to the end of the program, since the writing of data “1”into the memory cell has been completed, these verify operations may beomitted. When the verification of data “1” in the memory cell is notnecessary, the SDC need not hold data. Therefore, the next writing datamay be read from the outside world and stored in the SDC. With thisconfiguration, a much higher-speed operation is possible.

(Read)

Since a read operation is almost the same as in the second and thirdembodiments, its explanation will be omitted.

(Erase)

Since an erase operation is almost the same as in the first and fourthembodiments, its explanation will be omitted.

With the sixth embodiment, when data “3”, “5”, “7” are written into thememory cell in the third page program, a verify operation is carried outusing a threshold voltage lower than the original verify potential.Then, when the verify potential lower than the original one has beenexceeded and when the write operation has not been completed with theoriginal verify potential, the intermediate potential is supplied to thebit line to make the write speed slower in the next write operation. Inthis state, the write operation is carried out only once and then iscompleted. In a cell where the original verify potential has beenexceeded, the write operation is ended at that time. Furthermore, whendata “1” is written into the memory cell, a verify operation is carriedout using a verify voltage lower than the original verify potential.When the verify potential lower than the original one has been exceeded,the intermediate potential is supplied to the bit line in the next andlater write operations to make the write speed slower. Then, the writingis done until the original verify potential has been exceeded.Consequently, 8-valued (3 bit of) data can be written and read reliablyat high speed.

Moreover, with the sixth embodiment, the distribution of thresholdvoltages of a memory cell into which odd-numbered data “1”, “3”, “5”,“7” are written can be made narrower.

Seventh Embodiment

In the sixth embodiment, when the third page is written into, data “4”to data “7” are written into the memory cell in a first write operationand data “1” to data “3” are written into the memory cell in a secondwrite operation.

In contrast, in a seventh embodiment of the present invention, when thethird page is written into, data “1” to data “7” are written into thememory cell simultaneously. To achieve this, the configuration of thedata storage circuit 10 is modified slightly.

FIG. 53 shows a data storage circuit applied to the seventh embodiment.In FIG. 53, the same parts are indicated by the same reference numerals.As shown in FIG. 53, a secondary dynamic data cache (SDDC) is added tothe data storage circuit 10. The SDDC stores the data of the SDCtemporarily and, together with the SDC, PDC, DDC, and TDC, stores verifydata. The SDDC, which has almost the same configuration as that of theDDC, is composed of transistors 63 a, 63 b. One end of the current pathof the transistor 63 a is connected to node N2 b. A signal DTG2 issupplied to the gate of the transistor 63 a. The other end of thecurrent path of the transistor 63 a is connected to the gate of thetransistor 63 b. A signal VREG2 is supplied to one end of the currentpath of the transistor 63 b. The other end of the current path of thetransistor 63 b is connected to one end of the current path of thetransistor 63 c. The other end of the current path of the transistor 63c is connected to node N3. A signal REG2 is supplied to the gate of thetransistor 63 c.

With the above configuration, a three page write operation using thedata storage circuit 10 will be explained by reference to FIGS. 54, 55,56A, and 56B.

First, after the data storage circuit 10 is reset, writing data isexternally loaded into the SDC of the data storage circuit 10 (S401,S402). Thereafter, an internal read operation is carried out using thethreshold voltages “a”, “d*”, “f*”, thereby reading the data from thememory cell (S403).

FIG. 56A shows the data cache setting after a third page data load andinternal read operation. Here, the data in the SDC, DDC, and PDC are thesame as in FIG. 47A. When data “0”, “1” have been written in the memorycell, the data in the SDDC is set at “0”. When data “2” to “7” have beenwritten in the memory cell, the data in the SDDC is set at “1”.

Next, each data cache is operated, with the result that data is set ineach data cache as shown in FIG. 56B (S404). Here, the data in the SDDCis used to verify data “5”, “4”, “1”, “0”. The data in the SDC is usedto verify data “3”, “2”, “1”, “0”. The data in the DDC is used to verifydata “7”, “5”, “3”, “1”. As in the fifth embodiment, in the seventhembodiment, when writing is done, if the PDC has “0”, the bit linepotential is set at Vss. If the PDC has “1”, the bit line potential isset at Vdd. Thereafter, if the DDC has “1”, the bit line potential isset to an intermediate potential (e.g., Vth+0.5 V) and a write operationis carried out (S405).

A verify operation is carried out, starting from the lowest thresholdvoltage upward. Specifically, first, data “1” is verified using theverify potentials “a*′”, “a′” (S406 to S408). Thereafter, data “2” isverified using the verify potential “b′” (S409 to S412). Next, data “2”,“3” are verified using the verify potentials “b′”, “c*′”, “c′” (S413 toS415). Then, data “4” is verified using the verify potential “d′” (S416to S419). Thereafter, data “4”, “5” are verified using the verifypotentials “d′”, “e*′”, “e′” (S420 to S422). Next, data “6” is verifiedusing the verify potential “f′” (S423 to S426). Then, data “6”, “7” areverified using the verify potentials “f′”, “g*′”, “g′” (S427 to S429).This operation is repeated until the verification of each data has beencompleted (S430, S431).

In the above verify operation, in verifying data “3”, “5”, “7” in thememory cell, when the threshold voltage has reached a threshold voltagelower than the original one and is lower than the original thresholdvoltage, the data in the data cache are set as in the memory cell, thatis, data “2”, “4”, “6”. In this state, an intermediate potential issupplied to the bit line in the next program and a write operation iscarried out. In the next verify operation, the write operation iscompleted. In writing data “1” into the memory cell, when the thresholdvoltage lower than the original one has been reached, the intermediatepotential is supplied to the bit line in the subsequent program and thewrite operation is carried out. The write operation is repeated untilthe original threshold voltage has been reached.

In the seventh embodiment, the data storage circuit 10 is provided withthe SDDC which holds data used in verifying data “5”, “4”, “1”, “0” inthe memory cell. This makes it possible to write the third page data ata time and verify the data. Consequently, the write speed can be mademuch faster.

In the seventh embodiment, the SDDC is provided between the SDC and theTDC. The installation location of the SDDC is not limited to this. Forinstance, the SDDC may be provided between the PDC and the TDC and inparallel with the DDC as shown in FIG. 53 by the dotted line.

FIG. 57 shows a layout of a NAND EEPROM cell array to which the first toseventh embodiments are applied;

As shown in FIG. 57, in a NAND EEPROM memory cell array, a plurality ofmemory cells MC and select transistors S1 are connected in series alongbit lines BL. A plurality of memory cells MC arranged in the rowdirection are connected by a common control gate line (or word line) WLand select transistors S1 are connected by a common select gate lineSGL. To each of the select transistors S1, a bit line BL is connectedvia a bit line contact BC.

As shown in FIG. 58, the memory cell array has element formation regions112 formed on a silicon substrate 111. The element formation regions 112are separated by trenches 113. The gates of the memory cells MC and thegates of the select transistors S1 are formed on the element formationregions 112.

As shown in FIG. 59, memory cells MC adjacent to each other in thedirection of bit line BL share a source/drain diffused layer 114 aformed in the silicon substrate 111. A memory cell MC and a selecttransistor S1 adjacent to each other in the direction of bit line BLshare a source/drain diffused layer 114 b formed in the substrate 111.Select transistors S1 facing each other with a bit line contact BCbetween them share a source/drain diffused layer 114 c formed in thesubstrate 11.

In each of the element formation regions 112, a floating gate 122 a isformed via a first gate insulating film 121, a tunnel insulating film.Above the floating gate 122 a, a control gate 126 is formed via a secondgate insulating film 123. The control gate 126 is a two-layer structureof a polysilicon film 126 a and a tungsten silicide (WSi) film 126 b.The materials for the films 126 a and 126 b are not limited topolysilicon and tungsten silicide. For instance, a polysilicon silicidefilm or the like may be used. Since the floating gates 122 a, first gateinsulating films 121, and trenches 113 are patterned at the same time asexplained later, their side faces are aligned with one another.

On the inner walls (the bottom face and side faces) of a trench 113, aninsulating film 113 b is formed. On the side faces of a floating gate122 a, an insulating film 122 b is formed. In the trench 113, an elementisolating insulating film 130 is formed. The element isolatinginsulating film 130 is composed of a first element isolating insulatingfilm 131 and a second element isolating insulating film 132. As shown inFIG. 58, the first element isolating insulating film 131 has an extendedpart 131 e which is formed on the right and left sides along the innerswalls of the trench 113 and is in contact with the insulating films 113b and 122 b. The first element isolating insulating film 131 also has ahollow part 131 v in its central part. The hollow part 131 v is formedso as to take a concave shape with the height of the extended part 131 eat its peak. The upper end of the extended part 131 e is located abovethe undersurface of the floating gate 122 a and below the top surface ofthe floating gate 122 a and is made adjacent to the floating gate 122 avia the insulating film 122 b.

The second element isolating insulating film 132 is formed so as to fillthe hollow part 131 v of the first element isolating insulating film 131almost completely. The highest part of the first element isolatinginsulating film 131 (the upper end of the extended part 131 e) islocated above the highest part of the second element isolatinginsulating film 132 (the top surface 132 a). As a result, the elementisolating insulating film 130 has at its top a concave part 135 in whichthe control gate 126 is to be buried.

A control gate 126 is formed continuously across a plurality of elementformation regions 112 in a direction perpendicular to the bit line BL asshown in FIG. 58. The control gate 126 constitutes a word line WL. Asdescribed above, the height of the extended part 131 e is located belowthe top surface of the floating gate 122 a. The top surface 132 a ispositioned lower than the upper end of the extended part 131 e.Therefore, the control gate 126 is formed so as to fill not only the topof the floating gate 122 but also the concave part 135 between thefloating gates 122 a. This makes it possible to suppress the capacitycoupling between the adjacent floating gates 122 a.

As shown in FIG. 59, a select transistor S1 includes a gate 122 a′, aninsulating film 123′, a select gate line SGL (films 126 a′ and 126 b′).The gate 122 a′, insulating film 123′, and films 126 a′ and 126 b′ areeach made of the same material as that of the individual parts 122 a,123, 126 a, and 126 b of a memory cell MC. A select gate line SGL isconnected directly (or short-circuited) to the gate 122 a′ by removing apart of the second gate insulating film 123′.

A width of the control gate 126 (the word line WL), a length between thecontrol gates 126 (the word lines WL), a width of the bit line BL, andlength between bit lines are set, for example, as 70 nm, respectively.

NAND type EEPROM shown in each of the embodiments is applicable tovarious electronic equipments. FIGS. 60 to 66 show the examples. FIG. 60shows an example which applied NAND type EEPROM of each embodiment to amemory card.

A memory card 60 includes the semiconductor memory device 50 constitutedby the NAND type EEPROM as disclosed in each of the embodiments. Asshown in FIG. 60, the memory card 60 is operable to receive/outputpredetermined signals and data from/to an external device (not shown).

A signal line (DAT), a command line enable signal line (CLE), an addressline enable signal line (ALE) and a ready/busy signal line (R/B) areconnected to the memory card 60 having the semiconductor memory device50. The signal line (DAT) transfers data, address or command signals.The command line enable signal line (CLE) transfers a signal, whichindicates that a command signal is transferred on the signal line (DAT).The address line enable signal line (ALE) transfers a signal, whichindicates that an address signal is transferred on the signal line(DAT). The ready/busy signal line (R/B) transfers a signal, whichindicates whether the semiconductor memory device 50 is ready, or not.

Another exemplary assembly is shown in FIG. 61. The memory card shown inFIG. 61 differs from the memory card presented in FIG. 60 in that thememory card 60 of FIG. 61 includes, in addition to the semiconductormemory device 50 constituted by the NAND type EEPROM, a controller 70which controls the semiconductor memory device 50 and receives/transferspredetermined signals from/to an external device (not shown).

The controller 70 includes an interface unit (I/F) 71, 72, amicroprocessor unit (MPU) 73, a buffer RAM 74 and an error correctioncode (ECC) unit 75. The interface unit (I/F) 71, 72 receives/outputspredetermined signals from/to an external device (not shown) and thesemiconductor memory device 50, respectively. The microprocessor unit 73converts a logical address into a physical address. The buffer RAM 74stores data temporarily. The error correction code unit 75 generates anerror correction code. A command signal line (CMD), a clock signal line(CLK) and a signal line (DAT) are connected to the memory card 60. Itshould be noted that the number of the control signal lines, bit widthof the signal line (DAT) and a circuit construction of the controller 70could be modified suitably.

Another exemplary assembly is shown in FIG. 62. As can be seen from FIG.62, a memory cardholder 80 is provided for receiving a memory card 60having a semiconductor memory device 50 constituted by the NAND typeEEPROM as discussed in each the embodiments. The cardholder 80 isconnected to an electronic device (not shown) and is operable as aninterface between the card 60 and the electronic device. The cardholder80 may perform one or more of the functions of the controller 70described in connection with FIG. 62.

Another exemplary assembly will be explained with reference to FIG. 63.FIG. 63 shows a connecting apparatus operable to receive a memory cardor a cardholder, either of which includes the semiconductor memorydevice constituted by the NAND type EEPROM. The memory card orcardholder is insertable in the connecting apparatus 90 and iselectrically connectable to the apparatus. The connecting apparatus 90is connected to a board 91 via a connecting wire 92 and an interfacecircuit 93. The board 91 contains a CPU (Central Processing Unit) 94 anda bus 95.

Another exemplary assembly is shown in FIG. 64. As shown in FIG. 64, amemory card 60 or a cardholder 80, either of which includes thesemiconductor memory device constituted by the NAND type EEPROM, isinserted and electrically connectable to a connecting apparatus 90. Theconnecting apparatus 90 is connected to a PC (Personal Computer) 300 viaconnecting wire 92.

Another exemplary assembly is shown in FIGS. 65 and 66. As shown inFIGS. 65 and 66, a semiconductor memory device 50 constituted by theNAND type EEPROM as described in each of the embodiments and othercircuits such as ROM (read only memory) 410, RAM (random access memory)420 and CPU (central processing unit) 430 are included in an IC(interface circuit) card 500. The IC card 500 is connectable to anexternal device via a plane terminal 600 that is coupled to an MPU(micro-processing unit) portion 400 of the card 450. The CPU 430contains a calculation section 431 and a control section 432, thecontrol section 432 being coupled to the nonvolatile semiconductormemory device 50, the ROM 410 and the RAM 420. Preferably, the MPU 400is molded on one surface of the card 500 and the plane connectingterminal 600 is formed on the other surface.

Other implementations are readily discernable to one of ordinary skillin the art when the present description is read in view of thedescription in U.S. Pat. No. 6,002,605, which is incorporated herein byreference.

FIG. 67 shows another embodiment to which the NAND type EEPROM accordingto each of the above-described embodiments is applied. As shown in FIG.67, a universal serial bus (USB) memory system 142 is constituted by ahost platform 144 and a USB memory device 146.

The host platform 144 is connected to the USB memory device 146 via aUSB cable 148. The host platform 144 is connected to the USB cable 148via a USB connector 150, and the USB memory device 146 is connected tothe USB cable 148 via a USB connector 152. The host platform 144includes a USB host controller 154 controls packet transmitted on a USBbus.

The USB memory device 146 includes a USB flash controller 156, the USBconnector 152 and at least one flash memory module 158. The USB flashcontroller 156 controls the other elements of the USB memory device 146and also controls an interface of the USB memory device 146 to the USBbus. The flash memory module 158 includes a semiconductor memory deviceconstituted by the NAND type EEPROM according to each embodiment.

When the USB memory device 146 is connected to the host platform 144, astandard USB process starts. In this process, the host platform 144recognizes the USB memory device 146 to select a communication mode withthe USB memory device 146. Then, the host platform 144transfers/receives data to/from the USB memory device via afirst-in-first-out (FIFO) buffer which stores transmission data calledan end point. The host platform 144 recognizes changes of physical andelectrical states of the USB memory device 146, such asattachment/detachment, via another end point, and receives packets to bereceived if any.

The host platform 144 sends a request packet to the USB host controller154 to request for a service from the USB memory device 146. The USBhost controller 154 transmits the packet onto the USB cable 148. The USBmemory device 146 includes the end point which has accepted this requestpacket. In this case, these requests are received by the USB flashcontroller 156.

Next, the USB flash controller 156 carries out various operations suchas the read of data from the flash memory module 158, the write of thedata into the flash memory module 158, and the erase of the data.Furthermore, the USB flash controller 156 supports basic USB functionssuch as obtaining an USB address. The USB flash controller 156 controlsthe flash memory module 158 via a control line 160 for controllingoutputs of the flash memory module 158, and via various signals suchas/CE or a read/write signal. The flash memory module 158 is alsoconnected to the USB flash controller 156 via an address data bus 162.The address data bus 162 transfers commands of read, write, and erasewith respect to the flash memory module 158, and the address and data ofthe flash memory module 158.

The USB memory device 146 transmits a state packet using a state endpoint (end point 0) in order to inform the host platform 144 of resultsand states with respect to various operations which have requested bythe host platform 144. In this process, the host platform 144 checks ifthere is any state packet (poling), and the USB memory device 146returns an empty packet or the state packet itself, when there is not apacket of a new state message. It is to be noted that the USB cable 148may be omitted, and a USB connector may also be used to directly connectthe USB memory device 146 to the host platform 144. Additionally,various functions of the USB memory device can be carried out.

Additional advantages and modifications will readily occur to thoseskilled in the art. Therefore, the invention in its broader aspects isnot limited to the specific details and representative embodiments shownand described herein. Accordingly, various modifications may be madewithout departing from the spirit or scope of the general inventiveconcept as defined by the appended claims and their equivalents.

1. (canceled) 2: A semiconductor memory device comprising: a memory cellarray including a plurality of memory cells, each of the memory cellsbeing connected to a word line and a bit line and being capable ofstoring data based on first to n-th threshold voltages (n is a naturalnumber equal to or larger than 3) which are higher in order; and acontrol circuit which controls potentials of the word line and bit lineaccording to input data and writes data to the memory cell, wherein thecontrol circuit writes one of the first to n-th threshold voltages tothe memory cell by performing h write operations (h is a naturalnumber), each of the h write operations including a plurality of programoperations, a program voltage being applied to the word line in each ofthe program operations, in a first program operation of the h-th writeoperation, the control circuit writes k threshold voltages of the n-ththreshold voltage, (n−1)-th threshold voltage, . . . , and (n−k+1)-ththreshold voltage (k is a natural number) to memory cells, and in asecond program operation of the h-th write operation, the controlcircuit writes threshold voltages, which are equal to or lower than an(n−k)-th threshold voltage, to memory cells. 3: The semiconductor memorydevice according to claim 2, wherein the memory cells constitute a NANDflash memory. 4: A semiconductor memory device comprising: a memory cellarray including a plurality of memory cells, each of the memory cellsbeing connected to a word line and a bit line and being capable ofstoring data based on first to n-th threshold voltages (n is a naturalnumber equal to or larger than 3) which are higher in order; and acontrol circuit which controls potentials of the word line and bit lineaccording to input data and writes data to the memory cell, wherein thecontrol circuit writes one of the first to n-th threshold voltages tothe memory cell by performing h write operations (h is a naturalnumber), each of the h write operations including a plurality of programoperations, a program voltage being applied to the word line in each ofthe program operations, in a first program operation of the h-th writeoperation, the control circuit writes k1 threshold voltages of the n-ththreshold voltage, (n−1)-th threshold voltage, . . . , and (n−k1+1)-ththreshold voltage (k1 is a natural number smaller than n) to memorycells, in a second program operation of the h-th write operation, thecontrol circuit writes k2 threshold voltages of the (n−k1)-th thresholdvoltage, (n−k−1)-th threshold voltage, . . . , and (n−k1−k2+1)-ththreshold voltage (k2 is a natural number smaller than n) to memorycells, and in an i-th program operation (i is a natural number equal toor larger than 3) of the h-th write operation, the control circuitwrites (ki−1) threshold voltages (ki≧k2, and ki is a natural numbersmaller than n) of the ki-th threshold voltage, (ki−1)-th thresholdvoltage, . . . , and second threshold voltage to memory cells. 5: Thesemiconductor memory device according to claim 4, wherein the memorycells constitute a NAND flash memory.